From 8d4f9f73c873471a9ad7c3764790ad7911e19ac3 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 14 Dec 2005 03:36:20 +0000 Subject: [PATCH] magic-removal: Improved 'properties' model unit tests to test for setting attribute on a property git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1619 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/properties/models.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/modeltests/properties/models.py b/tests/modeltests/properties/models.py index ac7b6fe72f..661edd33c5 100644 --- a/tests/modeltests/properties/models.py +++ b/tests/modeltests/properties/models.py @@ -16,5 +16,11 @@ API_TESTS = """ >>> a = Person(first_name='John', last_name='Lennon') >>> a.save() >>> a.full_name -John Lennon +'John Lennon' + +# The "full_name" property hasn't provided a "set" method. +>>> a.full_name = 'Paul McCartney' +Traceback (most recent call last): + ... +AttributeError: can't set attribute """