Skip to content

Commit 336db7b

Browse files
authored
Fix a test that was failing for the new pinned hosts feature (#585)
1 parent 82e2aaf commit 336db7b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

awx/main/tests/unit/tasks/test_jobs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def test_pre_post_run_hook_facts(mock_create_partition, mock_facts_settings, fin
5555
org = Organization(pk=1)
5656
proj = Project(pk=1, organization=org)
5757
job = mock.MagicMock(spec=Job, use_fact_cache=True, project=proj, organization=org, job_slice_number=1, job_slice_count=1)
58+
job.job_slice_pinned_hosts_list = []
5859
job.inventory = mock_inventory
5960
job.execution_environment = execution_environment
6061
job.get_hosts_for_fact_cache = Job.get_hosts_for_fact_cache.__get__(job) # to run original method
@@ -102,6 +103,7 @@ def test_pre_post_run_hook_facts_deleted_sliced(mock_create_partition, mock_fact
102103
org = Organization(pk=1)
103104
proj = Project(pk=1, organization=org)
104105
job = mock.MagicMock(spec=Job, use_fact_cache=True, project=proj, organization=org, job_slice_number=1, job_slice_count=3)
106+
job.job_slice_pinned_hosts_list = []
105107
job.inventory = mock_inventory
106108
job.execution_environment = execution_environment
107109
job.get_hosts_for_fact_cache = Job.get_hosts_for_fact_cache.__get__(job) # to run original method

0 commit comments

Comments
 (0)