Пример #1
0
def test_parse_host_components():
    from batou.environment import parse_host_components
    assert (parse_host_components(['asdf']) == {
        'asdf': {
            'features': [],
            'ignore': False
        }
    })

    assert (parse_host_components(['!asdf']) == {
        'asdf': {
            'features': [],
            'ignore': True
        }
    })

    assert (parse_host_components(['!asdf:test', 'asdf:bar']) == {
        'asdf': {
            'features': ['test', 'bar'],
            'ignore': True
        }
    })

    assert (parse_host_components(['asdf:test', 'asdf:bar']) == {
        'asdf': {
            'features': ['test', 'bar'],
            'ignore': False
        }
    })
Пример #2
0
def test_parse_host_components():
    from batou.environment import parse_host_components

    assert parse_host_components(["asdf"]) == {
        "asdf": {
            "features": [],
            "ignore": False
        }
    }

    assert parse_host_components(["!asdf"]) == {
        "asdf": {
            "features": [],
            "ignore": True
        }
    }

    assert parse_host_components(["!asdf:test", "asdf:bar"]) == {
        "asdf": {
            "features": ["test", "bar"],
            "ignore": True
        }
    }

    assert parse_host_components(["asdf:test", "asdf:bar"]) == {
        "asdf": {
            "features": ["test", "bar"],
            "ignore": False
        }
    }