diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-03-21 18:48:57 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-03-21 21:29:51 +0100 |
| commit | 753a22a6352638b7df55176584795ac8c5d4232c (patch) | |
| tree | f022c8693a3d594a6d63e96d08b5078da84bac3a /tests/cache | |
| parent | 0f9560855e5ed203b8c911c23237826e28a62a38 (diff) | |
Fixed transaction handling in two management commands.
Previously, when createcachetable and flush operated on non-default
databases, they weren't atomic.
Diffstat (limited to 'tests/cache')
| -rw-r--r-- | tests/cache/tests.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py index 288af6e437..285bcfa4ed 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -981,9 +981,11 @@ class CreateCacheTableForDBCacheTests(TestCase): # cache table should be created on 'other' # Queries: # 1: check table doesn't already exist - # 2: create the table - # 3: create the index - with self.assertNumQueries(3, using='other'): + # 2: create savepoint + # 3: create the table + # 4: create the index + # 5: release savepoint + with self.assertNumQueries(5, using='other'): management.call_command('createcachetable', database='other', verbosity=0, interactive=False) |
