def test_flat_values_in_map(self): v = Variant("variant name") v.display_name("display name").run_on("distro").batch_time(100) obj = v.to_map() assert "variant name" == obj["name"] assert "display name" == obj["display_name"] assert ["distro"] == obj["run_on"] assert 100 == obj["batchtime"]
def test_invalid_display_name(self): v = Variant("variant name") with pytest.raises(TypeError): v.display_name(42)