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

Method test_underscore_removal

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

Source from the content-addressed store, hash-verified

828 assert isinstance(db.users[0].users, UsersBoxList)
829
830 def test_underscore_removal(self):
831 from box import Box
832
833 b = Box(_out="preserved", test_="safe")
834 b.update({"out": "updated", "test": "unsafe"})
835 assert b.out == "updated"
836 assert b._out == "preserved"
837 assert b.to_dict() == {"out": "updated", "test": "unsafe", "_out": "preserved", "test_": "safe"}
838 assert b.test == "unsafe"
839 assert b.test_ == "safe"
840
841 def test_is_in(self):
842 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