MCPcopy Create free account
hub / github.com/cdgriffith/Box / TestSBox

Class TestSBox

test/test_sbox.py:11–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10
11class TestSBox:
12 def test_property_box(self):
13 td = test_dict.copy()
14 td["inner"] = {"CamelCase": "Item"}
15
16 pbox = SBox(td, camel_killer_box=True)
17 assert isinstance(pbox.inner, SBox)
18 assert pbox.inner.camel_case == "Item"
19 assert json.loads(pbox.json)["inner"]["camel_case"] == "Item"
20 yaml = YAML()
21 test_item = yaml.load(pbox.yaml)
22 assert test_item["inner"]["camel_case"] == "Item"
23 assert repr(pbox["inner"]).startswith("SBox(")
24 assert not isinstance(pbox.dict, Box)
25 assert pbox.dict["inner"]["camel_case"] == "Item"
26 assert pbox.toml.startswith('key1 = "value1"')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected