Mercurial > p > roundup > code
comparison test/test_anydbm.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 |
|---|---|
| 17 | 17 |
| 18 import unittest, os, shutil, time | 18 import unittest, os, shutil, time |
| 19 from roundup.backends import get_backend | 19 from roundup.backends import get_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 HTMLItemTest | 22 from db_test_base import HTMLItemTest, SpecialActionTest |
| 23 | 23 |
| 24 class anydbmOpener: | 24 class anydbmOpener: |
| 25 module = get_backend('anydbm') | 25 module = get_backend('anydbm') |
| 26 | 26 |
| 27 def nuke_database(self): | 27 def nuke_database(self): |
| 50 | 50 |
| 51 from session_common import DBMTest | 51 from session_common import DBMTest |
| 52 class anydbmSessionTest(anydbmOpener, DBMTest, unittest.TestCase): | 52 class anydbmSessionTest(anydbmOpener, DBMTest, unittest.TestCase): |
| 53 pass | 53 pass |
| 54 | 54 |
| 55 class anydbmSpecialActionTestCase(anydbmOpener, SpecialActionTest, | |
| 56 unittest.TestCase): | |
| 57 backend = 'anydbm' | |
| 58 | |
| 55 # vim: set filetype=python ts=4 sw=4 et si | 59 # vim: set filetype=python ts=4 sw=4 et si |
