(self)
| 50 | assert bx.get_comment("last") is None |
| 51 | |
| 52 | def test_data_is_unaffected(self): |
| 53 | bx = Box.from_yaml(DOCUMENT) |
| 54 | plain = {"name": "box", "server": {"host": "localhost", "port": 8080}, "items": ["a", "b"], "last": 1} |
| 55 | assert bx.to_dict() == plain |
| 56 | assert json.loads(bx.to_json()) == plain |
| 57 | assert bx == plain |
| 58 | assert Box.from_yaml(DOCUMENT) == Box(plain) |
| 59 | |
| 60 | def test_edits_keep_comments_on_their_keys(self): |
| 61 | bx = Box.from_yaml(DOCUMENT) |