Browse Source

Add missing assertIn, assertNotIn methods on 2.6

pull/739/merge
Daniel Neuhäuser 12 years ago
parent
commit
8f73c552a9
  1. 7
      flask/testsuite/__init__.py

7
flask/testsuite/__init__.py

@ -154,6 +154,13 @@ class FlaskTestCase(unittest.TestCase):
def assert_not_in(self, x, y):
self.assertNotIn(x, y)
if sys.version_info[:2] == (2, 6):
def assertIn(self, x, y):
assert x in y, "%r unexpectedly not in %r" % (x, y)
def assertNotIn(self, x, y):
assert x not in y, "%r unexpectedly in %r" % (x, y)
class _ExceptionCatcher(object):

Loading…
Cancel
Save