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:
AlanCoding
2017-05-04 09:15:29 -04:00
parent 24a04d56f1
commit d826c45ac6
11 changed files with 37 additions and 37 deletions

View File

@@ -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()