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:
parent
569dd83ff6
commit
09c5a189ed
@ -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']
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user