Depending on pymongo it might raise a TypeError or ValueError

This commit is contained in:
Ross Lawley 2014-01-14 10:09:11 +00:00
parent 1b62dd5c40
commit 708dbac70e

View File

@ -491,7 +491,7 @@ class IndexesTest(unittest.TestCase):
def invalid_index_2(): def invalid_index_2():
return BlogPost.objects.hint(('tags', 1)) return BlogPost.objects.hint(('tags', 1))
self.assertRaises(TypeError, invalid_index_2) self.assertRaises(Exception, invalid_index_2)
def test_unique(self): def test_unique(self):
"""Ensure that uniqueness constraints are applied to fields. """Ensure that uniqueness constraints are applied to fields.