Skip to content

Commit aabb480

Browse files
committed
update integration tests with tags
1 parent 4e2d480 commit aabb480

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

integration_tests/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@ def _load_config():
3232
os.environ.get("TASKBADGER_PROJECT", ""),
3333
os.environ.get("TASKBADGER_API_KEY", ""),
3434
systems=[CelerySystemIntegration()],
35+
tags={
36+
"env": "integration",
37+
},
3538
)
3639
print(f"\nIntegration tests configuration:\n {badger.mug.Badger.current.settings}\n")

integration_tests/test_basics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ def test_basics():
99
task = badger.create_task("test basics", data=data)
1010
task.success(100)
1111
assert task.status == StatusEnum.SUCCESS
12+
assert task.tags == {"env": "integration"}
1213

1314
fresh = badger.get_task(task.id)
1415
assert fresh.status == StatusEnum.SUCCESS
1516
assert fresh.value == 100
1617
assert fresh.data == data
18+
assert fresh.tags == {"env": "integration"}

integration_tests/test_celery.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_celery(celery_session_app, celery_session_worker):
3434
assert tb_task.status == StatusEnum.SUCCESS
3535
assert tb_task.value == 100
3636
assert tb_task.data == {"result": a + b}
37+
assert tb_task.tags == {"env": "integration"}
3738

3839

3940
def test_celery_auto_track(celery_session_app, celery_session_worker):

0 commit comments

Comments
 (0)