Example #1
0
def test_register_alias_path():
    registry.register('/tmp', 'foobar')
    projects = registry.get_registry()
    assert '/tmp' in projects
    assert projects['/tmp']['alias'] == 'foobar'
    aliases = registry.get_aliases()
    assert 'foobar' in aliases
    assert aliases['foobar'] == '/tmp'
Example #2
0
def test_register_alias_path():
    registry.register('/tmp', 'foobar')
    projects = registry.get_registry()
    assert '/tmp' in projects
    assert projects['/tmp']['alias'] == 'foobar'
    aliases = registry.get_aliases()
    assert 'foobar' in aliases
    assert aliases['foobar'] == '/tmp'
Example #3
0
def test_unregister_alias_path():
    registry.unregister('/tmp')
    assert '/tmp' not in registry.get_registry()
    assert 'foobar' not in registry.get_aliases()
Example #4
0
def test_unregister_path():
    registry.unregister('/tmp')
    assert '/tmp' not in registry.get_registry()
Example #5
0
def test_register_path():
    registry.register('/tmp')
    assert '/tmp' in registry.get_registry()
Example #6
0
def test_load_registry():
    registry.load_registry()
    _projects = registry.get_registry()
    assert len(_projects) == 0
    assert isinstance(_projects, dict)
Example #7
0
def test_unregister_alias_path():
    registry.unregister('/tmp')
    assert '/tmp' not in registry.get_registry()
    assert 'foobar' not in registry.get_aliases()
Example #8
0
def test_unregister_path():
    registry.unregister('/tmp')
    assert '/tmp' not in registry.get_registry()
Example #9
0
def test_register_path():
    registry.register('/tmp')
    assert '/tmp' in registry.get_registry()
Example #10
0
def test_load_registry():
    registry.load_registry()
    _projects = registry.get_registry()
    assert len(_projects) == 0
    assert isinstance(_projects, dict)