summaryrefslogtreecommitdiffstats
path: root/awx_collection/test
diff options
context:
space:
mode:
authorMatthew Fernandez <l3acon@users.noreply.github.com>2023-04-10 23:31:11 +0200
committerGitHub <noreply@github.com>2023-04-10 23:31:11 +0200
commit184719e9f225149b197f4786247d9523af395354 (patch)
treeead60278e07909ab20f34b2db834d2203f9a0240 /awx_collection/test
parentadd test coverage (diff)
parentFixes bug where attempting to edit a schedule with stringified extra_data thr... (diff)
downloadawx-184719e9f225149b197f4786247d9523af395354.tar.xz
awx-184719e9f225149b197f4786247d9523af395354.zip
Merge branch 'devel' into collection-existential-state-for-credential-module
Diffstat (limited to 'awx_collection/test')
-rw-r--r--awx_collection/test/awx/test_completeness.py4
-rw-r--r--awx_collection/test/awx/test_project.py18
2 files changed, 21 insertions, 1 deletions
diff --git a/awx_collection/test/awx/test_completeness.py b/awx_collection/test/awx/test_completeness.py
index ef3d70727a..b4eb0ad3e4 100644
--- a/awx_collection/test/awx/test_completeness.py
+++ b/awx_collection/test/awx/test_completeness.py
@@ -20,7 +20,9 @@ read_only_endpoints_with_modules = ['settings', 'role', 'project_update', 'workf
# If a module should not be created for an endpoint and the endpoint is not read-only add it here
# THINK HARD ABOUT DOING THIS
-no_module_for_endpoint = []
+no_module_for_endpoint = [
+ 'constructed_inventory', # This is a view for inventory with kind=constructed
+]
# Some modules work on the related fields of an endpoint. These modules will not have an auto-associated endpoint
no_endpoint_for_module = [
diff --git a/awx_collection/test/awx/test_project.py b/awx_collection/test/awx/test_project.py
index 2f8724566a..04ec05bbf7 100644
--- a/awx_collection/test/awx/test_project.py
+++ b/awx_collection/test/awx/test_project.py
@@ -27,6 +27,24 @@ def test_create_project(run_module, admin_user, organization, silence_warning):
@pytest.mark.django_db
+def test_create_manual_project(run_module, admin_user, organization, mocker):
+ mocker.patch('awx.main.models.projects.Project.get_local_path_choices', return_value=['foo_folder/'])
+ result = run_module(
+ 'project',
+ dict(name='foo', organization=organization.name, scm_type='manual', local_path='foo_folder/', wait=False),
+ admin_user,
+ )
+ assert result.pop('changed', None), result
+
+ proj = Project.objects.get(name='foo')
+ assert proj.local_path == 'foo_folder/'
+ assert proj.organization == organization
+
+ result.pop('invocation')
+ assert result == {'name': 'foo', 'id': proj.id}
+
+
+@pytest.mark.django_db
def test_create_project_copy_from(run_module, admin_user, organization, silence_warning):
'''Test the copy_from functionality'''
result = run_module(