diff options
| author | François Freitag <francois.freitag@gmail.com> | 2016-09-17 06:29:14 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-09-17 09:29:14 -0400 |
| commit | 631ef6b2729f79c75f35cd32caa504dda7c32e9e (patch) | |
| tree | a965597f3c1260ef2e956fafcf46a9b0e8727f91 /tests/dates | |
| parent | 9027e6c8a3711034d345535036d1a276d9a8b829 (diff) | |
Made FieldError/FieldDoesNotExist messages uniform across Python versions.
Removed possible u'' prefixes on Python 2.
Diffstat (limited to 'tests/dates')
| -rw-r--r-- | tests/dates/tests.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/dates/tests.py b/tests/dates/tests.py index b7c7312c17..503d921ee1 100644 --- a/tests/dates/tests.py +++ b/tests/dates/tests.py @@ -6,7 +6,6 @@ from unittest import skipUnless from django.core.exceptions import FieldError from django.db import connection from django.test import TestCase, override_settings -from django.utils import six from .models import Article, Category, Comment @@ -86,10 +85,9 @@ class DatesTests(TestCase): Article.objects.dates() def test_dates_fails_when_given_invalid_field_argument(self): - six.assertRaisesRegex( - self, + self.assertRaisesMessage( FieldError, - "Cannot resolve keyword u?'invalid_field' into field. Choices are: " + "Cannot resolve keyword 'invalid_field' into field. Choices are: " "categories, comments, id, pub_date, pub_datetime, title", Article.objects.dates, "invalid_field", |
