def test_should_get_all_scopes(self): self.resource.get_all.return_value = ALL_SCOPES self.mock_ansible_module.params = copy.deepcopy(PARAMS_GET_ALL) ScopeFactsModule().run() self.mock_ansible_module.exit_json.assert_called_once_with( changed=False, ansible_facts=dict(scopes=ALL_SCOPES))
def test_should_get_scope_by_name(self): self.resource.get_by_name.return_value = SCOPE_2 self.mock_ansible_module.params = copy.deepcopy(PARAMS_GET_BY_NAME) ScopeFactsModule().run() self.mock_ansible_module.exit_json.assert_called_once_with( changed=False, ansible_facts=dict(scopes=[SCOPE_2]) )