Mercurial > p > roundup > code
comparison test/test_sqlite.py @ 5310:efb34cbdba7c
Add (currently failing) test for atomic actions
Actions via the web-interface can have several database-modifying
instructions. These should be atomic, i.e., either all should go in or
none. This is currently not the case due to commit calls from OTK
handling (CSRF-protection).
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Mon, 06 Nov 2017 09:26:59 +0100 |
| parents | 364c54991861 |
| children | 62de601bdf6f |
comparison
equal
deleted
inserted
replaced
| 5309:20084e2b48c3 | 5310:efb34cbdba7c |
|---|---|
| 18 import unittest, os, shutil, time | 18 import unittest, os, shutil, time |
| 19 from roundup.backends import get_backend, have_backend | 19 from roundup.backends import get_backend, have_backend |
| 20 | 20 |
| 21 from db_test_base import DBTest, ROTest, SchemaTest, ClassicInitTest, config | 21 from db_test_base import DBTest, ROTest, SchemaTest, ClassicInitTest, config |
| 22 from db_test_base import ConcurrentDBTest, FilterCacheTest | 22 from db_test_base import ConcurrentDBTest, FilterCacheTest |
| 23 from db_test_base import SpecialActionTest | |
| 23 | 24 |
| 24 class sqliteOpener: | 25 class sqliteOpener: |
| 25 if have_backend('sqlite'): | 26 if have_backend('sqlite'): |
| 26 module = get_backend('sqlite') | 27 module = get_backend('sqlite') |
| 27 | 28 |
| 50 | 51 |
| 51 | 52 |
| 52 class sqliteFilterCacheTest(sqliteOpener, FilterCacheTest, unittest.TestCase): | 53 class sqliteFilterCacheTest(sqliteOpener, FilterCacheTest, unittest.TestCase): |
| 53 backend = 'sqlite' | 54 backend = 'sqlite' |
| 54 | 55 |
| 56 class sqliteSpecialActionTestCase(sqliteOpener, SpecialActionTest, | |
| 57 unittest.TestCase): | |
| 58 backend = 'sqlite' | |
| 59 | |
| 55 | 60 |
| 56 from session_common import RDBMSTest | 61 from session_common import RDBMSTest |
| 57 class sqliteSessionTest(sqliteOpener, RDBMSTest, unittest.TestCase): | 62 class sqliteSessionTest(sqliteOpener, RDBMSTest, unittest.TestCase): |
| 58 pass | 63 pass |
