mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Fix and test for warning when creating project
This commit is contained in:
parent
0dcf6a2b1f
commit
f8b64f2222
@ -145,7 +145,7 @@ def main():
|
||||
scm_clean=dict(type='bool', default=False),
|
||||
scm_delete_on_update=dict(type='bool', default=False),
|
||||
scm_update_on_launch=dict(type='bool', default=False),
|
||||
scm_update_cache_timeout=dict(type='int', default=0),
|
||||
scm_update_cache_timeout=dict(type='int'),
|
||||
job_timeout=dict(type='int', default=0),
|
||||
custom_virtualenv=dict(),
|
||||
local_path=dict(),
|
||||
|
||||
25
awx_collection/test/awx/test_project.py
Normal file
25
awx_collection/test/awx/test_project.py
Normal file
@ -0,0 +1,25 @@
|
||||
import pytest
|
||||
|
||||
from awx.main.models import Project
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_create_project(run_module, admin_user, organization):
|
||||
result = run_module('tower_project', dict(
|
||||
name='foo',
|
||||
organization=organization.name,
|
||||
scm_type='git',
|
||||
scm_url='https://foo.invalid'
|
||||
), admin_user)
|
||||
assert result.pop('changed', None), result
|
||||
|
||||
proj = Project.objects.get(name='foo')
|
||||
assert proj.scm_url == 'https://foo.invalid'
|
||||
assert proj.organization == organization
|
||||
|
||||
result.pop('invocation')
|
||||
assert result == {
|
||||
'id': proj.id,
|
||||
'project': 'foo',
|
||||
'state': 'present'
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user