peterbe/django-mongokit — pull request #14 by nickzam (2013-06-03 10:36:25+00:00)
Title: Compatibility fix for Django 1.5 tests

Trying to run any unittest with 'ENGINE': 'django_mongokit.mongodb' on Django 1.5 returns error.

Traceback:
Testing started at 11:44 AM ...
Creating test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database 'mongodb'...

Process finished with exit code 1

Error
Traceback (most recent call last):
File "/home/zam/Envs/ebmesse/local/lib/python2.7/site-packages/django/test/testcases.py", line 259, in __call__
self._pre_setup()
File "/home/zam/Envs/ebmesse/local/lib/python2.7/site-packages/django/test/testcases.py", line 479, in _pre_setup
self._fixture_setup()
File "/home/zam/Envs/ebmesse/local/lib/python2.7/site-packages/django/test/testcases.py", line 829, in _fixture_setup
if not connections_support_transactions():
File "/home/zam/Envs/ebmesse/local/lib/python2.7/site-packages/django/test/testcases.py", line 816, in connections_support_transactions
for conn in connections.all())
File "/home/zam/Envs/ebmesse/local/lib/python2.7/site-packages/django/test/testcases.py", line 816, in
for conn in connections.all())
File "/home/zam/Envs/ebmesse/local/lib/python2.7/site-packages/django/utils/functional.py", line 43, in __get__
res = instance.__dict__[self.func.__name__] = self.func(instance)
File "/home/zam/Envs/ebmesse/local/lib/python2.7/site-packages/django/db/backends/__init__.py", line 455, in supports_transactions
self.connection.leave_transaction_management()
File "/home/zam/Envs/ebmesse/local/lib/python2.7/site-packages/pymongo/database.py", line 797, in __call__
self.__name, self.__connection.__class__.__name__))
TypeError: 'Database' object is not callable. If you meant to call the 'leave_transaction_management' method on a 'ConnectionWrapper' object it is failing because no such method exists.