diff options
Diffstat (limited to 'tests/dates')
| -rw-r--r-- | tests/dates/tests.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/dates/tests.py b/tests/dates/tests.py index 2177ad046e..cc6a571d0d 100644 --- a/tests/dates/tests.py +++ b/tests/dates/tests.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import datetime -from django.db.models.fields import FieldDoesNotExist +from django.core.exceptions import FieldError from django.test import TestCase from django.utils import six @@ -93,8 +93,9 @@ class DatesTests(TestCase): def test_dates_fails_when_given_invalid_field_argument(self): six.assertRaisesRegex( self, - FieldDoesNotExist, - "Article has no field named 'invalid_field'", + FieldError, + "Cannot resolve keyword u?'invalid_field' into field. Choices are: " + "categories, comments, id, pub_date, title", Article.objects.dates, "invalid_field", "year", |
