Added assertIn / assertNotIn for python 2.6

This commit is contained in:
Ross Lawley 2013-04-25 12:03:44 +00:00
parent bafdf0381a
commit f7bc58a767
2 changed files with 7 additions and 7 deletions

View File

@ -12,12 +12,6 @@ env:
- PYMONGO=2.5 DJANGO=1.5.1
- PYMONGO=2.5 DJANGO=1.4.2
- PYMONGO=2.4.2 DJANGO=1.4.2
matrix:
exclude:
- python: "2.6"
env: PYMONGO=dev DJANGO=1.5.1
- python: "2.6"
env: PYMONGO=2.5 DJANGO=1.5.1
install:
- if [[ $TRAVIS_PYTHON_VERSION == '2.'* ]]; then cp /usr/lib/*/libz.so $VIRTUAL_ENV/lib/; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.'* ]]; then pip install pil --use-mirrors ; true; fi

View File

@ -178,6 +178,12 @@ class MongoDBSessionTest(SessionTestsMixin, unittest.TestCase):
MongoSession.drop_collection()
super(MongoDBSessionTest, self).setUp()
def assertIn(self, first, second, msg=None):
self.assertTrue(first in second, msg)
def assertNotIn(self, first, second, msg=None):
self.assertFalse(first in second, msg)
def test_first_save(self):
session = SessionStore()
session['test'] = True