def test_wrong_athlete_type(self): # Only allowed options are 0 and 1 a = Athlete.deserialize({"athlete_type": 100}) self.assertEqual(a.athlete_type, 100)
def test_with_athlete_type_example_on_model(self): a = Athlete.deserialize({"athlete_type": 1}) self.assertEqual(a.athlete_type, "runner")