aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2019-04-13 18:32:19 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2019-04-13 18:32:19 +0200
commit3c33ddd2f85ac5475539cd1c5eae2f30fb9e6ea8 (patch)
treeb03b071e32f1633f6aaada41f4fa7505d74263d0 /tests
parent9b337be1a6e392923509fa94435164b0da98960d (diff)
Config for tests
Diffstat (limited to 'tests')
-rw-r--r--tests/data/test_config.yaml (renamed from tests/data/simple_config.yaml)0
-rw-r--r--tests/test_app.py4
-rw-r--r--tests/test_config.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/data/simple_config.yaml b/tests/data/test_config.yaml
index fa44e32..fa44e32 100644
--- a/tests/data/simple_config.yaml
+++ b/tests/data/test_config.yaml
diff --git a/tests/test_app.py b/tests/test_app.py
index a2ff27a..1ff504c 100644
--- a/tests/test_app.py
+++ b/tests/test_app.py
@@ -1,11 +1,11 @@
from tornado.testing import AsyncHTTPTestCase
-from pyapd import app
+from pyapd import app, config
class TestApp(AsyncHTTPTestCase):
def get_app(self, *args, **kw):
- return app.App()
+ return app.App(config.Config('tests/data/test_config.yaml'))
def test_root(self):
res = self.fetch('/')
diff --git a/tests/test_config.py b/tests/test_config.py
index 37f057e..7851019 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -13,10 +13,10 @@ class TestConfig(unittest.TestCase):
self.assertIn('backend', self.config.data)
def test_load_config_from_file(self):
- self.config.load('tests/data/simple_config.yaml')
+ self.config.load('tests/data/test_config.yaml')
self.assertEqual(
self.config.config_fn,
- 'tests/data/simple_config.yaml'
+ 'tests/data/test_config.yaml'
)
self.assertIn('backend', self.config.data)
self.assertEqual(self.config.backend, 'none')