예제 #1
0
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
예제 #2
0
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
예제 #3
0
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
예제 #4
0
    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
예제 #5
0
    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
예제 #6
0
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