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