Server IP : 85.214.239.14 / Your IP : 216.73.216.26 Web Server : Apache/2.4.65 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/ansible_collections/awx/awx/test/awx/ |
Upload File : |
from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest from awx.main.models import Organization @pytest.mark.django_db def test_create_organization(run_module, admin_user): module_args = { 'name': 'foo', 'description': 'barfoo', 'state': 'present', 'max_hosts': '0', 'controller_host': None, 'controller_username': None, 'controller_password': None, 'validate_certs': None, 'controller_oauthtoken': None, 'controller_config_file': None, } result = run_module('organization', module_args, admin_user) assert result.get('changed'), result org = Organization.objects.get(name='foo') assert result == {"name": "foo", "changed": True, "id": org.id, "invocation": {"module_args": module_args}} assert org.description == 'barfoo'