Mercurial > p > roundup > code
diff test/rest_common.py @ 6361:58817c3bf471
Fix roundup/test
Move the test-detectors in tx_Source_detector.py to roundup/test for two
reasons: It's used in the memorydb convenience functions and it may be
useful in other tests. Make the prefix a paramter of the convenience
functions to be usable in other tests.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Tue, 30 Mar 2021 14:16:28 +0200 |
| parents | 6a69584d117e |
| children | f2c31f5ec50b |
line wrap: on
line diff
--- a/test/rest_common.py Tue Mar 30 09:10:46 2021 +0200 +++ b/test/rest_common.py Tue Mar 30 14:16:28 2021 +0200 @@ -7,6 +7,7 @@ from time import sleep from datetime import datetime, timedelta +from roundup.test.tx_Source_detector import init as tx_Source_init try: from datetime import timezone @@ -230,12 +231,7 @@ self.db.post_init() - thisdir = os.path.dirname(__file__) - vars = {} - with open(os.path.join(thisdir, "tx_Source_detector.py")) as f: - code = compile(f.read(), "tx_Source_detector.py", "exec") - exec(code, vars) - vars['init'](self.db) + tx_Source_init(self.db) env = { 'PATH_INFO': 'http://localhost/rounduptest/rest/',
