From ee05e42a36258081636c7c9d564abe62244bf1d9 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 3 Feb 2006 23:47:36 +0000 Subject: [PATCH] magic-removal: Fixed errors in many_to_one_null model unit tests git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2259 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/many_to_one_null/models.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/modeltests/many_to_one_null/models.py b/tests/modeltests/many_to_one_null/models.py index 2ea7302fdf..592e6aaf3e 100644 --- a/tests/modeltests/many_to_one_null/models.py +++ b/tests/modeltests/many_to_one_null/models.py @@ -58,12 +58,16 @@ Second >>> a3.save() >>> a3.id 3 ->>> a3.reporter.id ->>> print a3.reporter.id -None +>>> a3.reporter +Traceback (most recent call last): + ... +DoesNotExist + >>> a3 = Article.objects.get(pk=3) >>> print a3.reporter.id -None +Traceback (most recent call last): + ... +DoesNotExist # Accessing an article's 'reporter' attribute throws ReporterDoesNotExist # if the reporter is set to None.