Ejemplo n.º 1
0
def test_service_features():
    service = Service(
        item="thingy",
        parameters={"size": 42},
        labels=[ServiceLabel("test-thing", "true")],
    )

    assert service.item == "thingy"
    assert service.parameters == {"size": 42}
    assert service.labels == [ServiceLabel("test-thing", "true")]

    assert repr(service) == ("Service(item='thingy', parameters={'size': 42},"
                             " labels=[ServiceLabel('test-thing', 'true')])")
Ejemplo n.º 2
0
def test_service_label():
    # as far as the API is concerned, the only important thing ist that they
    # exist, an can be created like this.
    _ = ServiceLabel('from-home-office', 'true')