Fix use of deprecated assert_ method.

This commit is contained in:
Georg Brandl 2012-02-20 21:37:22 +01:00
parent 242631da86
commit c425a94899
1 changed files with 2 additions and 2 deletions

View File

@ -4482,8 +4482,8 @@ class DictProxyTests(unittest.TestCase):
return '{' + ', '.join(sorted(kvs)) + '}' return '{' + ', '.join(sorted(kvs)) + '}'
dict_ = {k: v for k, v in self.C.__dict__.items()} dict_ = {k: v for k, v in self.C.__dict__.items()}
repr_ = repr(self.C.__dict__) repr_ = repr(self.C.__dict__)
self.assert_(repr_.startswith('dict_proxy(')) self.assertTrue(repr_.startswith('dict_proxy('))
self.assert_(repr_.endswith(')')) self.assertTrue(repr_.endswith(')'))
self.assertEqual(sorted_dict_repr(repr_[len('dict_proxy('):-len(')')]), self.assertEqual(sorted_dict_repr(repr_[len('dict_proxy('):-len(')')]),
sorted_dict_repr('{!r}'.format(dict_))) sorted_dict_repr('{!r}'.format(dict_)))