Ejemplo n.º 1
0
 def test_get_step_should_return_lodging_step(self):
     step_dto = dict(name='step',
                     start_datetime='2020-04-10 21:00:00',
                     type='Lodging')
     step = StepFactory().get(step_dto, 0)
     self.assertIsInstance(step, StepLodging)
Ejemplo n.º 2
0
 def test_get_step_should_return_taxi_transport_step(self):
     step_dto = dict(name='step',
                     start_datetime='2020-04-10 21:00:00',
                     type='TransportTaxi')
     step = StepFactory().get(step_dto, 0)
     self.assertIsInstance(step, StepTransportTaxi)
Ejemplo n.º 3
0
 def test_get_unknown_step_should_raise_exception(self):
     step_dto = dict(name='step',
                     start_datetime='2020-04-10 21:00:00',
                     type='Unknown')
     with self.assertRaises(UnknownStepTypeException):
         StepFactory().get(step_dto, 0)