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

Method test_functional_data

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

Source from the content-addressed store, hash-verified

808 assert bx2["Key 2"] == 4
809
810 def test_functional_data(self):
811 data = Box.from_json(filename=data_json_file, conversion_box=True, camel_killer_box=True, default_box=False)
812 assert data.widget
813
814 with pytest.raises(AttributeError):
815 data._bad_value
816
817 with pytest.raises(AttributeError):
818 data.widget._bad_value
819
820 base_config = data._Box__box_config()
821 assert base_config.pop("box_namespace") == ()
822 widget_config = data.widget._Box__box_config()
823 assert widget_config.pop("box_namespace") == ("widget",)
824
825 assert base_config == widget_config, "{} != {}".format(base_config, widget_config)
826
827 def test_functional_spaceballs(self):
828 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