diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/template_tests/test_context.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/template_tests/test_context.py b/tests/template_tests/test_context.py index 64d0df8d10..dac74b36e3 100644 --- a/tests/template_tests/test_context.py +++ b/tests/template_tests/test_context.py @@ -50,6 +50,17 @@ class ContextTests(TestCase): test_context['fruit'] self.assertIsNone(test_context.get('fruit')) + def test_flatten_context(self): + a = Context() + a.update({'a': 2}) + a.update({'b': 4}) + a.update({'c': 8}) + + self.assertEqual(a.flatten(), { + 'False': False, 'None': None, 'True': True, + 'a': 2, 'b': 4, 'c': 8 + }) + def test_context_comparable(self): test_data = {'x': 'y', 'v': 'z', 'd': {'o': object, 'a': 'b'}} |
