def test_start_when_not_initialized_raises_invalid_state_trigger(self): # Arrange actor = Actor(config=ActorConfig(component_id=self.component_id)) # Act, Assert with pytest.raises(InvalidStateTrigger): actor.start()
def test_stop_when_not_initialized_raises_invalid_state_trigger(self): # Arrange actor = Actor(config=ActorConfig(component_id=self.component_id)) try: actor.start() except InvalidStateTrigger: # Normally a bad practice but allows strategy to be put into # the needed state to run the test. pass # Act, Assert with pytest.raises(InvalidStateTrigger): actor.stop()