def test_adding_property(self): """Method to test the ConfigPropertyObject class""" a = ConfigPropertyObject("propA", { "a": 2, "b": "asdf" }, { "a": "This is an A thing", "b": "This is a B thing" }) a.add_property("c", [2, 3, 4], "this is a C thing") props = a.get_properties() assert len(props) == 3 assert "a" in props assert "b" in props assert "c" in props assert a.get_help_str("a") == "This is an A thing" assert a.get_help_str("b") == "This is a B thing" assert a.get_help_str("c") == "this is a C thing" assert a.c == [2, 3, 4]
def test_helpers(self): """Method to test the ConfigPropertyObject class""" a = ConfigPropertyObject("propA", { "a": 2, "b": "asdf" }, { "a": "This is an A thing", "b": "This is a B thing" }) props = a.get_properties() assert len(props) == 2 assert "a" in props assert "b" in props assert a.get_name() == "propA" assert a.get_help_str("a") == "This is an A thing" assert a.get_help_str("b") == "This is a B thing"