mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Made FieldError/FieldDoesNotExist messages uniform across Python versions.
Removed possible u'' prefixes on Python 2.
This commit is contained in:
parent
9027e6c8a3
commit
631ef6b272
5 changed files with 9 additions and 11 deletions
|
@ -688,7 +688,7 @@ class ExpressionsNumericTests(TestCase):
|
|||
self.assertEqual(Number.objects.get(pk=n.pk).float, Approximate(256.900, places=3))
|
||||
|
||||
def test_incorrect_field_expression(self):
|
||||
with six.assertRaisesRegex(self, FieldError, "Cannot resolve keyword u?'nope' into field.*"):
|
||||
with self.assertRaisesMessage(FieldError, "Cannot resolve keyword 'nope' into field."):
|
||||
list(Employee.objects.filter(firstname=F('nope')))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue