|
18 | 18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
19 | 19 | # SOFTWARE. |
20 | 20 |
|
21 | | -# $Id: test_security.py,v 1.6 2003-10-25 22:53:26 richard Exp $ |
| 21 | +# $Id: test_security.py,v 1.7 2004-11-18 15:54:09 a1s Exp $ |
22 | 22 |
|
23 | 23 | import os, unittest, shutil |
24 | 24 |
|
| 25 | +from roundup import backends |
25 | 26 | from roundup.password import Password |
26 | 27 | from db_test_base import setupSchema, MyTestCase, config |
27 | 28 |
|
28 | 29 | class PermissionTest(MyTestCase): |
29 | 30 | def setUp(self): |
30 | | - from roundup.backends import anydbm |
| 31 | + backend = backends.get_backend('anydbm') |
31 | 32 | # remove previous test, ignore errors |
32 | 33 | if os.path.exists(config.DATABASE): |
33 | 34 | shutil.rmtree(config.DATABASE) |
34 | 35 | os.makedirs(config.DATABASE + '/files') |
35 | | - self.db = anydbm.Database(config, 'admin') |
36 | | - setupSchema(self.db, 1, anydbm) |
| 36 | + self.db = backend.Database(config, 'admin') |
| 37 | + setupSchema(self.db, 1, backend) |
37 | 38 |
|
38 | 39 | def testInterfaceSecurity(self): |
39 | 40 | ' test that the CGI and mailgw have initialised security OK ' |
@@ -108,4 +109,4 @@ def test_suite(): |
108 | 109 | runner = unittest.TextTestRunner() |
109 | 110 | unittest.main(testRunner=runner) |
110 | 111 |
|
111 | | -# vim: set filetype=python ts=4 sw=4 et si |
| 112 | +# vim: set filetype=python sts=4 sw=4 et si : |
0 commit comments