mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 11:55:04 -02:30
mock capacity
This commit is contained in:
@@ -22,9 +22,10 @@ def epoch():
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def scheduler_factory(mocker, epoch):
|
def scheduler_factory(mocker, epoch):
|
||||||
|
mocker.patch('awx.main.models.Instance.objects.total_capacity', return_value=999999999)
|
||||||
|
|
||||||
def fn(tasks=[], inventory_sources=[], latest_project_updates=[], latest_inventory_updates=[], create_project_update=None, create_inventory_update=None):
|
def fn(tasks=[], inventory_sources=[], latest_project_updates=[], latest_inventory_updates=[], create_project_update=None, create_inventory_update=None):
|
||||||
sched = TaskManager()
|
sched = TaskManager()
|
||||||
sched.capacity_total = 999999999
|
|
||||||
|
|
||||||
sched.graph.get_now = lambda: epoch
|
sched.graph.get_now = lambda: epoch
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user