예제 #1
0
def test_basicprime_frozen():
    """Cannot change values from the charmhub config."""
    config = BasicPrime.from_dict({"bundle": {
        "prime": ["foo", "bar"],
    }})
    with pytest.raises(TypeError):
        config[0] = "broken"
예제 #2
0
def test_basicprime_frozen():
    """Cannot change values from the charmhub config."""
    config = BasicPrime.from_dict({'bundle': {
        'prime': ['foo', 'bar'],
    }})
    with pytest.raises(TypeError):
        config[0] = 'broken'
예제 #3
0
def test_basicprime_empty():
    """Building with an empty list."""
    config = BasicPrime.from_dict({"bundle": {
        "prime": [],
    }})
    assert config == ()
예제 #4
0
def test_basicprime_ok():
    """A simple building ok."""
    config = BasicPrime.from_dict({"bundle": {
        "prime": ["foo", "bar"],
    }})
    assert config == ("foo", "bar")
예제 #5
0
def test_basicprime_ok():
    """A simple building ok."""
    config = BasicPrime.from_dict({'bundle': {
        'prime': ['foo', 'bar'],
    }})
    assert config == ('foo', 'bar')