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

Method test_underscore_removal

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

Source from the content-addressed store, hash-verified

1155 assert isinstance(db.users[0].users, UsersBoxList)
1156
1157 def test_underscore_removal(self):
1158 from box import Box
1159
1160 b = Box(_out="preserved", test_="safe")
1161 b.update({"out": "updated", "test": "unsafe"})
1162 assert b.out == "updated"
1163 assert b._out == "preserved"
1164 assert b.to_dict() == {"out": "updated", "test": "unsafe", "_out": "preserved", "test_": "safe"}
1165 assert b.test == "unsafe"
1166 assert b.test_ == "safe"
1167
1168 def test_is_in(self):
1169 bx = Box()

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
to_dictMethod · 0.95
BoxClass · 0.90

Tested by

no test coverage detected