Rename PLAIN_TEXT to UTF8_TEXT, the code must match the documentation.
This commit is contained in:
@@ -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'})
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user