From ba2c13c57c795c3acc9bf529026ae7ff92780682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Gait=C3=A1n?= Date: Tue, 26 Nov 2013 20:34:33 -0300 Subject: [PATCH] assertIn fallback for py2.6/dj1.2 --- analytical/tests/test_tag_uservoice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/analytical/tests/test_tag_uservoice.py b/analytical/tests/test_tag_uservoice.py index dabc35c..0d78485 100644 --- a/analytical/tests/test_tag_uservoice.py +++ b/analytical/tests/test_tag_uservoice.py @@ -18,6 +18,12 @@ class UserVoiceTagTestCase(TagTestCase): Tests for the ``uservoice`` template tag. """ + def assertIn(self, element, container): + try: + super(TagTestCase, self).assertIn(element, container) + except AttributeError: + self.assertTrue(element in container) + def test_node(self): r = UserVoiceNode().render(Context()) self.assertIn("widget.uservoice.com/abcdefghijklmnopqrst.js", r)