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

Method test_functional_data

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

Source from the content-addressed store, hash-verified

759 assert bx2["Key 2"] == 4
760
761 def test_functional_data(self):
762 data = Box.from_json(filename=data_json_file, conversion_box=True, camel_killer_box=True, default_box=False)
763 assert data.widget
764
765 with pytest.raises(AttributeError):
766 data._bad_value
767
768 with pytest.raises(AttributeError):
769 data.widget._bad_value
770
771 base_config = data._Box__box_config()
772 assert base_config.pop("box_namespace") == ()
773 widget_config = data.widget._Box__box_config()
774 assert widget_config.pop("box_namespace") == ("widget",)
775
776 assert base_config == widget_config, "{} != {}".format(base_config, widget_config)
777
778 def test_functional_spaceballs(self):
779 my_box = Box(movie_data)

Callers

nothing calls this directly

Calls 2

from_jsonMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected