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

Method test_safe_attrs

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

Source from the content-addressed store, hash-verified

92 assert bx.a_b == 2
93
94 def test_safe_attrs(self):
95 assert Box()._safe_attr("BAD!KEY!1") == "BAD_KEY_1"
96 assert Box(camel_killer_box=True)._safe_attr("BAD!KEY!2") == "bad_key_2"
97 assert Box()._safe_attr((5, 6, 7)) == "x5_6_7"
98 assert Box()._safe_attr(356) == "x356"
99
100 def test_camel_killer(self):
101 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