def test_should_configure_if_simple_settings_is_installed(): POOL_OF_RAMOS = { 'backend_a': ['path.to.backend'], 'backend_b': ['path.to.backend'], } assert get_installed_pools() != POOL_OF_RAMOS with settings_stub(POOL_OF_RAMOS=POOL_OF_RAMOS): assert get_installed_pools() == POOL_OF_RAMOS
def test_should_configure_if_django_settings_is_installed(settings): settings.POOL_OF_RAMOS = { 'backend_a': ['path.to.backend'], 'backend_b': ['path.to.backend'], } assert get_installed_pools() == settings.POOL_OF_RAMOS
def assert_pools_is_equals_settings(pools, modules): with patch.dict('sys.modules', modules): from ramos import compat reload(compat) assert get_installed_pools() == pools
def test_should_configure_pools(self): pools = { 'backend_a': ['path.to.backend'], 'backend_b': ['path.to.backend'], } configure(pools=pools) assert get_installed_pools() == pools
def test_should_configure_pools(self): pools = { 'backend_a': [ 'path.to.backend' ], 'backend_b': [ 'path.to.backend' ] } configure(pools=pools) assert get_installed_pools() == pools
def test_should_configure_if_settings(settings): settings.POOL_OF_RAMOS = { 'backend_a': [ 'path.to.backend' ], 'backend_b': [ 'path.to.backend' ], } from ramos import compat reload(compat) assert get_installed_pools() == settings.POOL_OF_RAMOS