]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/tests/encodings.py
[encoding] Don't output patch mbox as quoted-printable
[patchwork] / apps / patchwork / tests / encodings.py
index ac63fb057c36faf857effdbfe27a7d2445515a62..9dde023eeeb6e1137ea67fb758f8070c9fd9dcfa 100644 (file)
@@ -48,6 +48,14 @@ class UTF8PatchViewTest(TestCase):
     def testMboxView(self):
         response = self.client.get('/patch/%d/mbox/' % self.patch.id)
         self.assertEquals(response.status_code, 200)
+        self.assertTrue(self.patch.content in \
+                response.content.decode(self.patch_encoding))
+
+    def testRawView(self):
+        response = self.client.get('/patch/%d/raw/' % self.patch.id)
+        self.assertEquals(response.status_code, 200)
+        self.assertEquals(response.content.decode(self.patch_encoding),
+                self.patch.content)
 
     def tearDown(self):
         self.patch.delete()