summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--awx/main/tests/functional/api/test_fact_versions.py3
-rw-r--r--awx/main/tests/functional/commands/test_cleanup_facts.py5
2 files changed, 3 insertions, 5 deletions
diff --git a/awx/main/tests/functional/api/test_fact_versions.py b/awx/main/tests/functional/api/test_fact_versions.py
index 04246aa890..26f552dc60 100644
--- a/awx/main/tests/functional/api/test_fact_versions.py
+++ b/awx/main/tests/functional/api/test_fact_versions.py
@@ -79,9 +79,6 @@ def test_basic_options_fields(hosts, fact_scans, options, user):
url = reverse('api:host_fact_versions_list', args=(hosts[0].pk,))
response = options(url, None, user('admin', True), pk=hosts[0].id)
- import json
- print(json.dumps(response.data))
-
assert 'related' in response.data['actions']['GET']
assert 'module' in response.data['actions']['GET']
assert ("ansible", "Ansible") in response.data['actions']['GET']['module']['choices']
diff --git a/awx/main/tests/functional/commands/test_cleanup_facts.py b/awx/main/tests/functional/commands/test_cleanup_facts.py
index 93aec40928..9582d6fa54 100644
--- a/awx/main/tests/functional/commands/test_cleanup_facts.py
+++ b/awx/main/tests/functional/commands/test_cleanup_facts.py
@@ -3,6 +3,7 @@
# Python
import pytest
+import mock
from dateutil.relativedelta import relativedelta
from datetime import timedelta
@@ -91,7 +92,7 @@ def test_cleanup_logic(fact_scans, hosts):
timestamp_pivot -= granularity
assert fact.timestamp == timestamp_pivot
-@mock.patch('awx.api.views.feature_enabled', new=mock_feature_enabled)
+@mock.patch('awx.main.management.commands.cleanup_facts.feature_enabled', new=mock_feature_enabled)
@pytest.mark.django_db
def test_parameters_ok(mocker):
run = mocker.patch('awx.main.management.commands.cleanup_facts.CleanupFacts.run')
@@ -162,7 +163,7 @@ def test_string_time_to_timestamp_invalid():
res = cmd.string_time_to_timestamp(kv['time'])
assert res is None
-@mock.patch('awx.api.views.feature_enabled', new=mock_feature_enabled)
+@mock.patch('awx.main.management.commands.cleanup_facts.feature_enabled', new=mock_feature_enabled)
@pytest.mark.django_db
def test_parameters_fail(mocker):
# Mock run() just in case, but it should never get called because an error should be thrown