def test_get_tree(self): """ Method 'get_tree()' should return the entire data tree """ c = ConfTree() c.tree = {"foo": True} assert c.get_tree() == {"foo": True}
def test_merge_data_tree(self): """ Test that merging of 2 data tree:s work """ c = ConfTree() c.tree = {"foo": True} c.merge_data_tree({"bar": False}) assert c.tree == {"foo": True, "bar": False}
def test_get(self): """ Test that 'get()' returns correct data """ c = ConfTree() c.tree = {"foo": True, "bar": 1, "qwe": "rty"} assert c.get("foo", False) is True assert c.get("bar", -1) == 1 assert c.get("qwe", "ytr") == "rty" assert c.get("foobar", "barfoo") == "barfoo"
def test_get(self): """ Test that 'get()' returns correct data """ c = ConfTree() c.tree = { "foo": True, "bar": 1, "qwe": "rty" } assert c.get("foo", False) is True assert c.get("bar", -1) == 1 assert c.get("qwe", "ytr") == "rty" assert c.get("foobar", "barfoo") == "barfoo"