def test_it_returns_model_from_manufacturer(self): manufacturer = AStubRouter.manufacturer model = AStubRouter.model router = Routers.get(manufacturer, model) self.assertIsInstance(router, AStubRouter)
def test_it_returns_sorted_models_available(self): self.assertEqual(AStubRouter.as_str(), Routers.list()[0]) self.assertEqual(ZStubRouter.as_str(), Routers.list()[-1])
def test_it_returns_all_models_from_manufacturer(self): manufacturer = AStubRouter.manufacturer routers = Routers.from_manufacturer(manufacturer) self.assertTrue(AStubRouter in routers) self.assertFalse(ZStubRouter in routers)