1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

remove forgotten print

This commit is contained in:
Chris Meyers 2016-03-03 13:58:11 -05:00
parent 569dd83ff6
commit 09c5a189ed
2 changed files with 3 additions and 5 deletions

View File

@ -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']

View File

@ -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