def setUp(self): self.test_pilot = Pilot() self.test_pilot.name = "Marco Merli" self.test_pilot.save() self.test_vehicle = Vehicle() self.test_vehicle.name = "F3" self.test_vehicle.save() self.test_raceway = Raceway() self.test_raceway.name = "Interlagos" self.test_raceway.save()
class TestCaseUnit(TestCase): test_pilot = None test_vehicle = None test_raceway = None def setUp(self): self.test_pilot = Pilot() self.test_pilot.name = "Marco Merli" self.test_pilot.save() self.test_vehicle = Vehicle() self.test_vehicle.name = "F3" self.test_vehicle.save() self.test_raceway = Raceway() self.test_raceway.name = "Interlagos" self.test_raceway.save()