mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 22:07:36 -02:30
SCM Inventory field name changes
on InventorySource model * scm_project -> source_project on InventorySourceSerializer * scm_inventories -> scm_inventory_sources on InventoryUpdate model * scm_project_update -> source_project_update
This commit is contained in:
@@ -14,12 +14,12 @@ class TestSCMUpdateFeatures:
|
||||
|
||||
def test_automatic_project_update_on_create(self, inventory, project):
|
||||
inv_src = InventorySource(
|
||||
scm_project=project,
|
||||
source_project=project,
|
||||
source_path='inventory_file',
|
||||
inventory=inventory,
|
||||
update_on_project_update=True,
|
||||
source='scm')
|
||||
with mock.patch.object(inv_src.scm_project, 'update') as mck_update:
|
||||
with mock.patch.object(inv_src.source_project, 'update') as mck_update:
|
||||
inv_src.save()
|
||||
mck_update.assert_called_once_with()
|
||||
|
||||
@@ -32,7 +32,7 @@ class TestSCMUpdateFeatures:
|
||||
|
||||
def test_no_unwanted_updates(self, scm_inventory_source):
|
||||
# Changing the non-sensitive fields should not trigger update
|
||||
with mock.patch.object(scm_inventory_source.scm_project, 'update') as mck_update:
|
||||
with mock.patch.object(scm_inventory_source.source_project, 'update') as mck_update:
|
||||
scm_inventory_source.name = 'edited_inventory'
|
||||
scm_inventory_source.description = "I'm testing this!"
|
||||
scm_inventory_source.save()
|
||||
|
||||
Reference in New Issue
Block a user