From 33f40a47caf28eb72c87cd8d7967538954e0b576 Mon Sep 17 00:00:00 2001 From: Benjamin Bay Date: Tue, 7 Jul 2020 14:25:04 -0700 Subject: [PATCH] added 2 tests for celery app --- tests/test_celery.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/test_celery.py diff --git a/tests/test_celery.py b/tests/test_celery.py new file mode 100644 index 000000000..e39fac194 --- /dev/null +++ b/tests/test_celery.py @@ -0,0 +1,17 @@ +import re + +def test_broker_url(): + """ + Ensure the celery application 'broker_url' roughly matches the required pattern. + """ + from merlin.celery import app + assert re.match(r"amqps:\/\/\w+:.+@jackalope\.llnl\.gov:\d+\/\w+", app.conf.broker_url) + + +def test_result_backend(): + """ + Ensure the celery application 'result_backend' roughly matches the required pattern. + """ + from merlin.celery import app + assert re.match(r"redis:\/\/\w+:\w+@jackalope\.llnl\.gov:\d+\/\w+", app.conf.broker_url) +