Mercurial > p > roundup > code
comparison test/memorydb.py @ 4795:dad18ee491a9
Fix minor problems in tests
Make gpg test fault tolerant against existing directory.
Fix path problems for new auditor.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Sat, 06 Jul 2013 12:10:50 +0200 |
| parents | 6e9b9743de89 |
| children | 88fc7202f87d |
comparison
equal
deleted
inserted
replaced
| 4794:8a413c3083c9 | 4795:dad18ee491a9 |
|---|---|
| 40 vars = dict(db=db, admin_email='admin@test.com', | 40 vars = dict(db=db, admin_email='admin@test.com', |
| 41 adminpw=password.Password('sekrit')) | 41 adminpw=password.Password('sekrit')) |
| 42 execfile(initial_data, vars) | 42 execfile(initial_data, vars) |
| 43 | 43 |
| 44 # load standard detectors | 44 # load standard detectors |
| 45 dirname = os.path.join(os.path.dirname(__file__), | 45 thisdir = os.path.dirname(__file__) |
| 46 dirname = os.path.join(thisdir, | |
| 46 '../share/roundup/templates/classic/detectors') | 47 '../share/roundup/templates/classic/detectors') |
| 47 for fn in os.listdir(dirname): | 48 for fn in os.listdir(dirname): |
| 48 if not fn.endswith('.py'): continue | 49 if not fn.endswith('.py'): continue |
| 49 vars = {} | 50 vars = {} |
| 50 execfile(os.path.join(dirname, fn), vars) | 51 execfile(os.path.join(dirname, fn), vars) |
| 51 vars['init'](db) | 52 vars['init'](db) |
| 52 | 53 |
| 53 vars = {} | 54 vars = {} |
| 54 execfile("test/tx_Source_detector.py", vars) | 55 execfile(os.path.join(thisdir, "tx_Source_detector.py"), vars) |
| 55 vars['init'](db) | 56 vars['init'](db) |
| 56 | 57 |
| 57 ''' | 58 ''' |
| 58 status = Class(db, "status", name=String()) | 59 status = Class(db, "status", name=String()) |
| 59 status.setkey("name") | 60 status.setkey("name") |
