Merge pull request #27 from AlanCoding/initial_sync

Use "sync" type when doing SCM inv src update on create
This commit is contained in:
Alan Rominger
2017-07-24 21:20:08 -04:00
committed by GitHub
4 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ from awx.main.models import InventorySource
@pytest.fixture
def scm_inventory(inventory, project):
with mock.patch.object(project, 'update'):
with mock.patch('awx.main.models.unified_jobs.UnifiedJobTemplate.update'):
inventory.inventory_sources.create(
name='foobar', update_on_project_update=True, source='scm',
source_project=project, scm_last_revision=project.scm_revision)

View File

@@ -314,7 +314,7 @@ def scm_inventory_source(inventory, project):
update_on_project_update=True,
inventory=inventory,
scm_last_revision=project.scm_revision)
with mock.patch.object(inv_src.source_project, 'update'):
with mock.patch('awx.main.models.unified_jobs.UnifiedJobTemplate.update'):
inv_src.save()
return inv_src