Skip to content

Commit

Permalink
Add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ewjoachim committed Jan 8, 2022
1 parent b073b88 commit fe4a45f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ def test_app_register_builtins(app):
assert "builtin:procrastinate.builtin_tasks.remove_old_jobs" in app.tasks


def test_builtin_tasks_prefix(app, connector):
# Test that when assigning multiple apps, we don't end up with duplicate
# namespaces.
app2 = app_module.App(connector=connector)
assert "builtin:procrastinate.builtin_tasks.remove_old_jobs" in app.tasks
assert (
"builtin:builtin:procrastinate.builtin_tasks.remove_old_jobs" not in app.tasks
)
assert app2.tasks == app.tasks


def test_app_register(app):
task = tasks.Task(task_func, blueprint=app, queue="queue", name="bla")

Expand Down

0 comments on commit fe4a45f

Please sign in to comment.