Exemplo n.º 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'
Exemplo n.º 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'
Exemplo n.º 3
0
def test_unregister_alias_path():
    registry.unregister('/tmp')
    assert '/tmp' not in registry.get_registry()
    assert 'foobar' not in registry.get_aliases()
Exemplo n.º 4
0
def test_unregister_path():
    registry.unregister('/tmp')
    assert '/tmp' not in registry.get_registry()
Exemplo n.º 5
0
def test_register_path():
    registry.register('/tmp')
    assert '/tmp' in registry.get_registry()
Exemplo n.º 6
0
def test_load_registry():
    registry.load_registry()
    _projects = registry.get_registry()
    assert len(_projects) == 0
    assert isinstance(_projects, dict)
Exemplo n.º 7
0
def test_unregister_alias_path():
    registry.unregister('/tmp')
    assert '/tmp' not in registry.get_registry()
    assert 'foobar' not in registry.get_aliases()
Exemplo n.º 8
0
def test_unregister_path():
    registry.unregister('/tmp')
    assert '/tmp' not in registry.get_registry()
Exemplo n.º 9
0
def test_register_path():
    registry.register('/tmp')
    assert '/tmp' in registry.get_registry()
Exemplo n.º 10
0
def test_load_registry():
    registry.load_registry()
    _projects = registry.get_registry()
    assert len(_projects) == 0
    assert isinstance(_projects, dict)