mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
more test cleanup from 3.2.2 merge
This commit is contained in:
@@ -210,20 +210,6 @@ class TestHostInsights():
|
|||||||
assert resp.status_code == 404
|
assert resp.status_code == 404
|
||||||
|
|
||||||
|
|
||||||
class TestInventoryHostsList(object):
|
|
||||||
|
|
||||||
def test_host_list_smart_inventory(self, mocker):
|
|
||||||
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):
|
|
||||||
with mock.patch('awx.main.utils.filters.SmartFilter.query_from_string') as mock_query:
|
|
||||||
view = InventoryHostsList()
|
|
||||||
view.get_queryset()
|
|
||||||
mock_query.assert_called_once_with('localhost')
|
|
||||||
|
|
||||||
|
|
||||||
class TestSurveySpecValidation:
|
class TestSurveySpecValidation:
|
||||||
|
|
||||||
def test_create_text_encrypted(self):
|
def test_create_text_encrypted(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user