(self)
| 187 | Box('{"k1": "v1", "k2": {"k3": "v2"}}') |
| 188 | |
| 189 | def test_basic_box(self): |
| 190 | a = Box(one=1, two=2, three=3) |
| 191 | b = Box({"one": 1, "two": 2, "three": 3}) |
| 192 | c = Box((zip(["one", "two", "three"], [1, 2, 3]))) |
| 193 | d = Box(([("two", 2), ("one", 1), ("three", 3)])) |
| 194 | e = Box(({"three": 3, "one": 1, "two": 2})) |
| 195 | assert a == b == c == d == e |
| 196 | |
| 197 | def test_protected_box_methods(self): |
| 198 | my_box = Box(a=3) |