| 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) |