mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 15:27:47 -02:30
Changed status tweaks for API validation and encryption
API validation topic: - do not set changed=True if the object did not actually change - deals with cases where API manipulates data before saving Warn if encrypted data prevent accurate changed status Handle false changed case of tower_user password password field not present in data Test changed=True warning with JT/WFJT survey spec defaults case for list data in JSON
This commit is contained in:
@@ -241,12 +241,12 @@ def silence_deprecation():
|
||||
"""The deprecation warnings are stored in a global variable
|
||||
they will create cross-test interference. Use this to turn them off.
|
||||
"""
|
||||
with mock.patch('ansible.module_utils.basic.AnsibleModule.deprecate'):
|
||||
yield
|
||||
with mock.patch('ansible.module_utils.basic.AnsibleModule.deprecate') as this_mock:
|
||||
yield this_mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def silence_warning():
|
||||
"""Warnings use global variable, same as deprecations."""
|
||||
with mock.patch('ansible.module_utils.basic.AnsibleModule.warn'):
|
||||
yield
|
||||
with mock.patch('ansible.module_utils.basic.AnsibleModule.warn') as this_mock:
|
||||
yield this_mock
|
||||
|
||||
Reference in New Issue
Block a user