mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 08:37:48 -02:30
rename awx modules folder to collection
This commit is contained in:
25
awx_collection/test/awx/test_organization.py
Normal file
25
awx_collection/test/awx/test_organization.py
Normal file
@@ -0,0 +1,25 @@
|
||||
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'}
|
||||
|
||||
result = run_module('tower_organization', module_args, admin_user)
|
||||
|
||||
org = Organization.objects.get(name='foo')
|
||||
|
||||
assert result == {
|
||||
"organization": "foo",
|
||||
"state": "present",
|
||||
"id": org.id,
|
||||
"changed": True,
|
||||
"invocation": {
|
||||
"module_args": module_args
|
||||
}
|
||||
}
|
||||
|
||||
assert org.description == 'barfoo'
|
||||
Reference in New Issue
Block a user