Update unit tests to exhibit problem

Exhibits the problem that occurs when a model has a one-to-one
relationship with another model that is itself derived (subclassed)
from a third model.
This commit is contained in:
pscottdevos 2016-07-20 15:31:42 -05:00
parent 8ac0c0cbea
commit 61dbf89bd5

View File

@ -42,15 +42,3 @@ class InheritedModelSerializationTests(TestCase):
serializer = DerivedModelSerializer(child)
self.assertEqual(set(serializer.data.keys()),
set(['name1', 'name2', 'id', 'childassociatedmodel']))
def test_data_is_valid_without_parent_ptr(self):
"""
Assert that the pointer to the parent table is not a required field
for input data
"""
data = {
'name1': 'parent name',
'name2': 'child name',
}
serializer = DerivedModelSerializer(data=data)
self.assertEqual(serializer.is_valid(), True)