diff options
author | ZachLiuGIS <zachliugis@gmail.com> | 2016-02-10 20:46:57 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-02-11 10:07:39 -0500 |
commit | 04e13c89138d48c20e774a2b6bf06796f73ac0fe (patch) | |
tree | 0023c60c24ace9e5dc2a176ffbf0f8c0c10f9c74 /tests/one_to_one | |
parent | 353aecbf8c1a8cc6f3985149e2895d49e53dfc1c (diff) | |
download | django-04e13c89138d48c20e774a2b6bf06796f73ac0fe.tar.gz |
Fixed #26179 -- Removed null assignment check for non-nullable foreign key fields.
Diffstat (limited to 'tests/one_to_one')
-rw-r--r-- | tests/one_to_one/tests.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/one_to_one/tests.py b/tests/one_to_one/tests.py index 4e3ce072a4..074a95f1b5 100644 --- a/tests/one_to_one/tests.py +++ b/tests/one_to_one/tests.py @@ -228,9 +228,8 @@ class OneToOneTests(TestCase): ug_bar.place = None self.assertIsNone(ug_bar.place) - # Assigning None fails: Place.restaurant is null=False - with self.assertRaises(ValueError): - setattr(p, 'restaurant', None) + # Assigning None will not fail: Place.restaurant is null=False + setattr(p, 'restaurant', None) # You also can't assign an object of the wrong type here with self.assertRaises(ValueError): |