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

Method test_safe_attrs

test/test_box.py:57–61  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55 shutil.rmtree(str(tmp_dir), ignore_errors=True)
56
57 def test_safe_attrs(self):
58 assert Box()._safe_attr("BAD!KEY!1") == "BAD_KEY_1"
59 assert Box(camel_killer_box=True)._safe_attr("BAD!KEY!2") == "bad_key_2"
60 assert Box()._safe_attr((5, 6, 7)) == "x5_6_7"
61 assert Box()._safe_attr(356) == "x356"
62
63 def test_camel_killer(self):
64 assert _camel_killer("CamelCase") == "camel_case"

Callers

nothing calls this directly

Calls 2

BoxClass · 0.90
_safe_attrMethod · 0.80

Tested by

no test coverage detected