xintron/django-mongorunner — pull request #2 by jose-lpa (2012-12-19 14:17:46+00:00)
Title: Little optimizations in TestRunner.

Hi!

I made some little changes in `TestRunner` class.

Now it's possible to have a `MONGODB_TESTING` variable in Django settings module to define the name of the testing database; otherwise, `test_suite` is used as generic name.

Also the original code didn't worked, since it was not really using the active database. If you define a MongoDB database to connect to in settings, the former `TestRunner` class used that database for testing. Now, it disconnects any previously loaded database before creating the testing one, so you ensure that it's using that.

I removed also the `pymongo` imports, since it's possible to get the connection in `teardown_databases` method through the `mongoengine.connection.get_connection` method, so no more imports needed :)

There are some addings in `setup.py` script, so I think installation will be more clear.

Hope you find that useful.

Cheers,
Jose