| 9 | |
| 10 | |
| 11 | class 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"') |
nothing calls this directly
no outgoing calls
no test coverage detected