From c30238cfd76e5094f58d73dece68eaa12259e5af Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 12 2019 11:27:32 +0000 Subject: Fix getting the dev-data tests to run This sets up redis and makes it accessible to the dev-data script, in addition, the git folders are pointed to the temp folder used for the tests so this doesn't impact our own dev environment. Signed-off-by: Pierre-Yves Chibon --- diff --git a/tests/test_dev_data.py b/tests/test_dev_data.py index b60c734..720616c 100644 --- a/tests/test_dev_data.py +++ b/tests/test_dev_data.py @@ -23,7 +23,7 @@ REPO_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) import tests # noqa -class TestDevData(tests.SimplePagureTest): +class TestDevData(tests.Modeltests): """This test class contains tests pertaining to the dev-data utility script.""" @@ -36,7 +36,12 @@ class TestDevData(tests.SimplePagureTest): config_path = os.path.join(self.path, "config") with open(config_path, "w") as f: - f.write("DB_URL = 'sqlite:///%s/db_dev_data.sqlite'" % self.path) + f.write("DB_URL = 'sqlite:///%s/db_dev_data.sqlite'\n" % self.path) + f.write("GIT_FOLDER = '%s/repos'\n" % self.path) + f.write( + "BROKER_URL = 'redis+socket://%(global_path)s/broker'\n" % \ + self.config_values) + f.write("CELERY_CONFIG = {'task_always_eager': True}\n") env = { "USER_NAME": "testuser",