def test_get_primary_key_compound_key(self): # get_primary_key() returns a tuple of all the values in the model # instance's primary key when the model uses a compound primary key. storm_object = FakeStormCompoundPrimaryKeyClass() storm_object.id1 = 1234 storm_object.id2 = 5678 self.assertEqual((1234, 5678), get_primary_key(storm_object))
def test_get_primary_key(self): # get_primary_key() returns the value of the model instance's primary # key. storm_object = FakeStormClass() storm_object.id = 1234 self.assertEqual(1234, get_primary_key(storm_object))