Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Test asynchronous task execution by celery worker

Jakub Draganek45faaf84de93
diff --git a/tests/test_asynchronous_tasks.py b/tests/test_asynchronous_tasks.py
new file mode 100644
index 0000000000..bdc25a3fb8
--- /dev/null
+++ b/tests/test_asynchronous_tasks.py
@@ -0,0 +1,14 @@
+from __future__ import unicode_literals
+
+import celery
+import pytest
+
+
+def dummy_task(x):
+ return x+1
+
+
+def test_task_running_asynchronously_on_worker(celery_worker):
+ assert dummy_task.delay(42).get(timeout=10) == 43