The ContentType repr() incorrectly used , instead of ;.
This commit is contained in:
parent
65bfef955e
commit
990176b4fa
6
NEWS
6
NEWS
@ -25,6 +25,12 @@ Improvements
|
||||
|
||||
A simple bug fix, and better error messages when you don't up-call.
|
||||
|
||||
Changes
|
||||
-------
|
||||
|
||||
* ``testtools.content_type.ContentType`` incorrectly used ',' rather than ';'
|
||||
to separate parameters. (Robert Collins)
|
||||
|
||||
Improvements
|
||||
------------
|
||||
|
||||
|
@ -29,7 +29,7 @@ class ContentType(object):
|
||||
def __repr__(self):
|
||||
if self.parameters:
|
||||
params = '; '
|
||||
params += ', '.join(
|
||||
params += '; '.join(
|
||||
sorted('%s="%s"' % (k, v) for k, v in self.parameters.items()))
|
||||
else:
|
||||
params = ''
|
||||
|
@ -43,7 +43,7 @@ class TestContentType(TestCase):
|
||||
content_type = ContentType(
|
||||
'text', 'plain', {'foo': 'bar', 'baz': 'qux'})
|
||||
self.assertThat(
|
||||
repr(content_type), Equals('text/plain; baz="qux", foo="bar"'))
|
||||
repr(content_type), Equals('text/plain; baz="qux"; foo="bar"'))
|
||||
|
||||
|
||||
class TestBuiltinContentTypes(TestCase):
|
||||
|
Loading…
Reference in New Issue
Block a user