mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-07 15:18:12 +08:00
Adds global override test to Async
This commit is contained in:
@@ -185,3 +185,11 @@ def test_async_class(broker):
|
|||||||
a.run()
|
a.run()
|
||||||
assert a.result_group() == [-1]
|
assert a.result_group() == [-1]
|
||||||
assert a.fetch_group() == [a.fetch()]
|
assert a.fetch_group() == [a.fetch()]
|
||||||
|
# global overrides
|
||||||
|
Conf.SYNC = True
|
||||||
|
Conf.CACHED = True
|
||||||
|
a = Async('math.floor', 1.5)
|
||||||
|
a.run()
|
||||||
|
assert a.result() == 1
|
||||||
|
Conf.SYNC = False
|
||||||
|
Conf.CACHED = False
|
||||||
|
|||||||
Reference in New Issue
Block a user