X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Ftests%2Fencodings.py;h=9dde023eeeb6e1137ea67fb758f8070c9fd9dcfa;hb=65404776f7f0e975737a5c8c69dc0b2ae5fe93da;hp=ac63fb057c36faf857effdbfe27a7d2445515a62;hpb=e0fac2b893fd69caedd00c9256ac1e59c8dcbc9b;p=patchwork diff --git a/apps/patchwork/tests/encodings.py b/apps/patchwork/tests/encodings.py index ac63fb0..9dde023 100644 --- a/apps/patchwork/tests/encodings.py +++ b/apps/patchwork/tests/encodings.py @@ -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()