diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py index c96cd993ad..16df447c91 100644 --- a/tests/modeltests/basic/models.py +++ b/tests/modeltests/basic/models.py @@ -73,12 +73,12 @@ Area woman programs in Python >>> Article.objects.get(id__exact=2) Traceback (most recent call last): ... -DoesNotExist: Article does not exist for {'id__exact': 2} +DoesNotExist: Article matching query does not exist. >>> Article.objects.get(pub_date__year=2005, pub_date__month=8) Traceback (most recent call last): ... -DoesNotExist: Article does not exist for ... +DoesNotExist: Article matching query does not exist. # Lookup by a primary key is the most common case, so Django provides a # shortcut for primary-key exact lookups. diff --git a/tests/modeltests/custom_pk/models.py b/tests/modeltests/custom_pk/models.py index df127ba3a8..fed2c25515 100644 --- a/tests/modeltests/custom_pk/models.py +++ b/tests/modeltests/custom_pk/models.py @@ -44,7 +44,7 @@ Fran Bones >>> Employee.objects.get(pk='foo') Traceback (most recent call last): ... -DoesNotExist: Employee does not exist for {'pk': 'foo'} +DoesNotExist: Employee matching query does not exist. # Use the name of the primary key, rather than pk. >>> Employee.objects.get(employee_code__exact='ABC123') diff --git a/tests/modeltests/get_latest/models.py b/tests/modeltests/get_latest/models.py index 4b81dc837c..0af2146c64 100644 --- a/tests/modeltests/get_latest/models.py +++ b/tests/modeltests/get_latest/models.py @@ -34,7 +34,7 @@ API_TESTS = """ >>> Article.objects.latest() Traceback (most recent call last): ... -DoesNotExist: Article does not exist for ... +DoesNotExist: Article matching query does not exist. # Create a couple of Articles. >>> from datetime import datetime diff --git a/tests/modeltests/lookup/models.py b/tests/modeltests/lookup/models.py index 605c05adbe..4b8454f855 100644 --- a/tests/modeltests/lookup/models.py +++ b/tests/modeltests/lookup/models.py @@ -135,7 +135,7 @@ Article 6 >>> a5.get_next_by_pub_date() Traceback (most recent call last): ... -DoesNotExist: Article does not exist for ... +DoesNotExist: Article matching query does not exist. >>> a6.get_next_by_pub_date() Article 5 >>> a7.get_next_by_pub_date() diff --git a/tests/modeltests/one_to_one/models.py b/tests/modeltests/one_to_one/models.py index ef8a166afb..6aaa3e586d 100644 --- a/tests/modeltests/one_to_one/models.py +++ b/tests/modeltests/one_to_one/models.py @@ -53,7 +53,7 @@ Demon Dogs the restaurant >>> p2.restaurant Traceback (most recent call last): ... -DoesNotExist: Restaurant does not exist for {'place__pk': ...} +DoesNotExist: Restaurant matching query does not exist. # Set the place using assignment notation. Because place is the primary key on Restaurant, # the save will create a new restaurant