diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-01-26 14:55:27 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-01-26 14:55:27 +0000 |
| commit | 167d1cbdf5aa6f62d7ce6282fc73db3b5b6c7a76 (patch) | |
| tree | 5fe8ec7cf79cf9f84f4acf5a55e31daddae21e2d | |
| parent | 3af1bf8217653f4e5ed337957607835e3f146039 (diff) | |
[1.2.X] Made a transaction test optional unless transactions are supported.
Backport of r15325 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15326 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | tests/regressiontests/fixtures_regress/tests.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/regressiontests/fixtures_regress/tests.py b/tests/regressiontests/fixtures_regress/tests.py index 9655ba00ce..98b9fd6747 100644 --- a/tests/regressiontests/fixtures_regress/tests.py +++ b/tests/regressiontests/fixtures_regress/tests.py @@ -611,7 +611,8 @@ class TestTicket11101(TransactionTestCase): transaction.rollback() self.assertEqual(Thingy.objects.count(), 0) - def test_ticket_11101(self): - """Test that fixtures can be rolled back (ticket #11101).""" - ticket_11101 = transaction.commit_manually(self.ticket_11101) - ticket_11101() + if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] != 'django.db.backends.mysql': + def test_ticket_11101(self): + """Test that fixtures can be rolled back (ticket #11101).""" + ticket_11101 = transaction.commit_manually(self.ticket_11101) + ticket_11101() |
