backend of org-scoped smart inventories

This commit is contained in:
AlanCoding
2017-08-29 16:43:56 -04:00
parent a3b29a196c
commit ff96a750e1
5 changed files with 45 additions and 3 deletions

View File

@@ -220,8 +220,8 @@ class TestHostInsights():
class TestInventoryHostsList(object):
def test_host_list_smart_inventory(self, mocker):
Inventory = namedtuple('Inventory', ['kind', 'host_filter', 'hosts'])
obj = Inventory(kind='smart', host_filter='localhost', hosts=HostManager())
Inventory = namedtuple('Inventory', ['kind', 'host_filter', 'hosts', 'organization_id'])
obj = Inventory(kind='smart', host_filter='localhost', hosts=HostManager(), organization_id=None)
obj.hosts.instance = obj
with mock.patch.object(InventoryHostsList, 'get_parent_object', return_value=obj):