Rename PLAIN_TEXT to UTF8_TEXT, the code must match the documentation.

This commit is contained in:
Jonathan Lange
2010-08-05 11:04:56 +01:00
parent 49b524c8f4
commit a3b8ba54b3
2 changed files with 6 additions and 6 deletions

View File

@@ -30,4 +30,4 @@ class ContentType(object):
return "%s/%s params=%s" % (self.type, self.subtype, self.parameters)
PLAIN_TEXT = ContentType('text', 'plain', {'charset': 'utf8'})
UTF8_TEXT = ContentType('text', 'plain', {'charset': 'utf8'})

View File

@@ -2,7 +2,7 @@
from testtools import TestCase
from testtools.matchers import Equals
from testtools.content_type import ContentType, PLAIN_TEXT
from testtools.content_type import ContentType, UTF8_TEXT
class TestContentType(TestCase):
@@ -33,10 +33,10 @@ class TestContentType(TestCase):
class TestBuiltinContentTypes(TestCase):
def test_plain_text(self):
# The PLAIN_TEXT content type represents UTF-8 encoded text/plain.
self.assertThat(PLAIN_TEXT.type, Equals('text'))
self.assertThat(PLAIN_TEXT.subtype, Equals('plain'))
self.assertThat(PLAIN_TEXT.parameters, Equals({'charset': 'utf8'}))
# The UTF8_TEXT content type represents UTF-8 encoded text/plain.
self.assertThat(UTF8_TEXT.type, Equals('text'))
self.assertThat(UTF8_TEXT.subtype, Equals('plain'))
self.assertThat(UTF8_TEXT.parameters, Equals({'charset': 'utf8'}))
def test_suite():