summaryrefslogtreecommitdiff
path: root/tests/template_tests/test_context.py
diff options
context:
space:
mode:
authorMarek WywiaƂ <onjinx@gmail.com>2014-02-15 13:45:52 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2014-02-15 17:14:28 +0100
commitd97bf2e9c8971764690caaf81a0914bc368d6b02 (patch)
tree7a0292a47237f5c688e6958859a7ef63ba470d5b /tests/template_tests/test_context.py
parent985ae732b2fbb073a7c98ff857f463449345df27 (diff)
Fixed #21765 -- Added support for comparing Context instances
Diffstat (limited to 'tests/template_tests/test_context.py')
-rw-r--r--tests/template_tests/test_context.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/template_tests/test_context.py b/tests/template_tests/test_context.py
index bbf6918103..f810feda74 100644
--- a/tests/template_tests/test_context.py
+++ b/tests/template_tests/test_context.py
@@ -49,3 +49,8 @@ class ContextTests(TestCase):
with self.assertRaises(KeyError):
test_context['fruit']
self.assertIsNone(test_context.get('fruit'))
+
+ def test_context_comparable(self):
+ test_data = {'x': 'y', 'v': 'z', 'd': {'o': object, 'a': 'b'}}
+
+ self.assertEquals(Context(test_data), Context(test_data))