def test_init_single_factory(self): """ Test that action factory can be initialised with single sub factory """ mock_model = mock(Model) mock_attack_factory = mock(AttackFactory) factory = ActionFactory(mock_model, mock_attack_factory) factories = factory.get_sub_factories() assert_that(mock_attack_factory, is_in(factories))
def test_init_factory_list(self): """ Test that action factory can be initialised with list of factories """ mock_model = mock(Model) mock_move_factory = mock(MoveFactory) mock_attack_factory = mock(AttackFactory) factory = ActionFactory(mock_model, [mock_attack_factory, mock_move_factory]) factories = factory.get_sub_factories() assert_that(mock_attack_factory, is_in(factories)) assert_that(mock_move_factory, is_in(factories))