mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.7.x] Restored Python 2 compatibility.
Backport of ee51ab9d232e52d17cd5ad32e230fd715cffe638 from master.
This commit is contained in:
parent
099625d760
commit
47d345fe6d
@ -59,7 +59,7 @@ class FormsTestCase(TestCase):
|
|||||||
self.assertHTMLEqual(str(p['birthday']), '<input type="text" name="birthday" value="1940-10-9" id="id_birthday" />')
|
self.assertHTMLEqual(str(p['birthday']), '<input type="text" name="birthday" value="1940-10-9" id="id_birthday" />')
|
||||||
|
|
||||||
nonexistenterror = "Key u?'nonexistentfield' not found in 'Person'"
|
nonexistenterror = "Key u?'nonexistentfield' not found in 'Person'"
|
||||||
with self.assertRaisesRegex(KeyError, nonexistenterror):
|
with six.assertRaisesRegex(self, KeyError, nonexistenterror):
|
||||||
p['nonexistentfield']
|
p['nonexistentfield']
|
||||||
self.fail('Attempts to access non-existent fields should fail.')
|
self.fail('Attempts to access non-existent fields should fail.')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user