(self)
| 132 | self.assertIsNone(test_context.get("fruit")) |
| 133 | |
| 134 | def test_flatten_context(self): |
| 135 | a = Context() |
| 136 | a.update({"a": 2}) |
| 137 | a.update({"b": 4}) |
| 138 | a.update({"c": 8}) |
| 139 | |
| 140 | self.assertEqual( |
| 141 | a.flatten(), |
| 142 | {"False": False, "None": None, "True": True, "a": 2, "b": 4, "c": 8}, |
| 143 | ) |
| 144 | |
| 145 | def test_flatten_context_with_context(self): |
| 146 | """ |