diff options
author | Alan Rominger <arominge@redhat.com> | 2023-04-25 19:31:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 19:31:46 +0200 |
commit | 0a13762f1182cde948e37cd9a963ead233117051 (patch) | |
tree | 26dad7094490466dd026b9d1d70f939e45fa8c91 /awx_collection/test | |
parent | Adding "password": "$encrypted$" to user serializer (#13704) (diff) | |
download | awx-0a13762f1182cde948e37cd9a963ead233117051.tar.xz awx-0a13762f1182cde948e37cd9a963ead233117051.zip |
Use separate module for pytest settings (#13895)
* Use separate module for test settings
* Further refine some pre-existing comments in settings
* Add CACHES to setting snapshot exceptions to accommodate changed load order
Diffstat (limited to 'awx_collection/test')
-rw-r--r-- | awx_collection/test/awx/test_bulk.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/awx_collection/test/awx/test_bulk.py b/awx_collection/test/awx/test_bulk.py index 6ba97e9006..e0315732db 100644 --- a/awx_collection/test/awx/test_bulk.py +++ b/awx_collection/test/awx/test_bulk.py @@ -10,7 +10,7 @@ from awx.main.models import WorkflowJob @pytest.mark.django_db def test_bulk_job_launch(run_module, admin_user, job_template): jobs = [dict(unified_job_template=job_template.id)] - run_module( + result = run_module( 'bulk_job_launch', { 'name': "foo-bulk-job", @@ -21,6 +21,8 @@ def test_bulk_job_launch(run_module, admin_user, job_template): }, admin_user, ) + assert not result.get('failed', False), result.get('msg', result) + assert result.get('changed'), result bulk_job = WorkflowJob.objects.get(name="foo-bulk-job") assert bulk_job.extra_vars == '{"animal": "owl"}' @@ -30,7 +32,7 @@ def test_bulk_job_launch(run_module, admin_user, job_template): @pytest.mark.django_db def test_bulk_host_create(run_module, admin_user, inventory): hosts = [dict(name="127.0.0.1"), dict(name="foo.dns.org")] - run_module( + result = run_module( 'bulk_host_create', { 'inventory': inventory.name, @@ -38,6 +40,8 @@ def test_bulk_host_create(run_module, admin_user, inventory): }, admin_user, ) + assert not result.get('failed', False), result.get('msg', result) + assert result.get('changed'), result resp_hosts = inventory.hosts.all().values_list('name', flat=True) for h in hosts: assert h['name'] in resp_hosts |