def test_classes_iterator_should_return_an_interator_with_all_backends_classes( # noqa self, configured_pools ): backends = BackendPool.classes_iterator() assert isinstance(backends, Iterator) backend_0 = next(backends) backend_1 = next(backends) assert issubclass(backend_0, FakeXYZBackend) assert issubclass(backend_1, FakeABCBackend)
def test_classes_iterator_should_return_an_interator_with_all_backends_classes( # noqa self): configure( pools={ BackendPool.backend_type: ( u'{module}.{cls}'.format(module=__name__, cls=FakeXYZBackend.__name__), u'{module}.{cls}'.format(module=__name__, cls=FakeABCBackend.__name__), ) }) backends = BackendPool.classes_iterator() assert isinstance(backends, Iterator) backend_0 = next(backends) backend_1 = next(backends) assert issubclass(backend_0, FakeXYZBackend) assert issubclass(backend_1, FakeABCBackend)