summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/generic_relations/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/generic_relations/tests.py b/tests/generic_relations/tests.py
index c22a6ef7e0..ca029c6050 100644
--- a/tests/generic_relations/tests.py
+++ b/tests/generic_relations/tests.py
@@ -572,6 +572,11 @@ id="id_generic_relations-taggeditem-content_type-object_id-1-id" /></p>""" % tag
tag.object_id = cauliflower.id
self.assertEqual(tag.content_object, cauliflower)
+ def test_assign_content_object_in_init(self):
+ spinach = Vegetable(name="spinach")
+ tag = TaggedItem(content_object=spinach)
+ self.assertEqual(tag.content_object, spinach)
+
class CustomWidget(forms.TextInput):
pass