diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-07-17 02:20:29 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-07-17 02:20:29 +0000 |
| commit | 59089a7d1384f5697e75c55f95a10e721757e2e7 (patch) | |
| tree | 1cdefa7dd98bbfbed2c17c8dff372a16c0a1c8a3 /tests/regressiontests/mongodb/tests.py | |
| parent | 536a5ca51466e3de0b19351dc826710a1e159cf5 (diff) | |
[soc2010/query-refactor] Ensure that calling close() doesn't blow up if a connection was never opened.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/mongodb/tests.py')
| -rw-r--r-- | tests/regressiontests/mongodb/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/mongodb/tests.py b/tests/regressiontests/mongodb/tests.py index a39aec29d1..c87a4b18d4 100644 --- a/tests/regressiontests/mongodb/tests.py +++ b/tests/regressiontests/mongodb/tests.py @@ -1,3 +1,4 @@ +from django.db import connection from django.db.models import Count, F from django.test import TestCase @@ -337,3 +338,8 @@ class MongoTestCase(TestCase): ], lambda g: g.name, ) + + def test_close(self): + # Ensure that closing a connection that was never established doesn't + # blow up. + connection.close() |
