diff --git a/awx/main/tests/functional/api/test_fact_versions.py b/awx/main/tests/functional/api/test_fact_versions.py index 145ed749d4..8fa6178cb6 100644 --- a/awx/main/tests/functional/api/test_fact_versions.py +++ b/awx/main/tests/functional/api/test_fact_versions.py @@ -59,7 +59,7 @@ def check_system_tracking_feature_forbidden(response): assert 'Your license does not permit use of system tracking.' == response.data['detail'] -@mock.patch('awx.api.views.feature_enabled', new=mock_feature_disabled) +@mock.patch('awx.api.views.mixin.feature_enabled', new=mock_feature_disabled) @pytest.mark.django_db @pytest.mark.license_feature def test_system_tracking_license_get(hosts, get, user): @@ -70,7 +70,7 @@ def test_system_tracking_license_get(hosts, get, user): check_system_tracking_feature_forbidden(response) -@mock.patch('awx.api.views.feature_enabled', new=mock_feature_disabled) +@mock.patch('awx.api.views.mixin.feature_enabled', new=mock_feature_disabled) @pytest.mark.django_db @pytest.mark.license_feature def test_system_tracking_license_options(hosts, options, user): diff --git a/awx/main/tests/functional/api/test_fact_view.py b/awx/main/tests/functional/api/test_fact_view.py index 682eb65bba..9a46871973 100644 --- a/awx/main/tests/functional/api/test_fact_view.py +++ b/awx/main/tests/functional/api/test_fact_view.py @@ -41,7 +41,7 @@ def check_system_tracking_feature_forbidden(response): assert 'Your license does not permit use of system tracking.' == response.data['detail'] -@mock.patch('awx.api.views.feature_enabled', new=mock_feature_disabled) +@mock.patch('awx.api.views.mixin.feature_enabled', new=mock_feature_disabled) @pytest.mark.django_db @pytest.mark.license_feature def test_system_tracking_license_get(hosts, get, user): @@ -52,7 +52,7 @@ def test_system_tracking_license_get(hosts, get, user): check_system_tracking_feature_forbidden(response) -@mock.patch('awx.api.views.feature_enabled', new=mock_feature_disabled) +@mock.patch('awx.api.views.mixin.feature_enabled', new=mock_feature_disabled) @pytest.mark.django_db @pytest.mark.license_feature def test_system_tracking_license_options(hosts, options, user): diff --git a/awx/main/tests/functional/api/test_job.py b/awx/main/tests/functional/api/test_job.py index 8cda6a6cfe..8cd26e71ba 100644 --- a/awx/main/tests/functional/api/test_job.py +++ b/awx/main/tests/functional/api/test_job.py @@ -141,7 +141,7 @@ def test_block_unprocessed_events(delete, admin_user, mocker): view = MockView() time_of_request = time_of_finish + relativedelta(seconds=2) - with mock.patch('awx.api.views.now', lambda: time_of_request): + with mock.patch('awx.api.views.mixin.now', lambda: time_of_request): r = view.destroy(request) assert r.status_code == 400 @@ -162,7 +162,7 @@ def test_block_related_unprocessed_events(mocker, organization, project, delete, ) view = RelatedJobsPreventDeleteMixin() time_of_request = time_of_finish + relativedelta(seconds=2) - with mock.patch('awx.api.views.now', lambda: time_of_request): + with mock.patch('awx.api.views.mixin.now', lambda: time_of_request): with pytest.raises(PermissionDenied): view.perform_destroy(organization)