예제 #1
0
 def test_for_class(self):
     """Test _coerce_data_to_model_types for the model itself"""
     
     result = _coerce_data_to_model_types(Pilot, self.initial_data)
     
     eq_(result, self.final_data, 
         "Expected to get: %r, got %r" % (result, self.final_data))
예제 #2
0
 def test_for_instance(self):
     """Test _coerce_data_to_model_types for model instances"""
     
     pilot = Pilot()
     
     result = _coerce_data_to_model_types(pilot, self.initial_data)
     
     eq_(result, self.final_data, 
         "Expected to get: %r, got %r" % (result, self.final_data))