mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
fix up a few test and lint errors related to external logging
This commit is contained in:
committed by
Christian Adams
parent
b942fde59a
commit
39648b4f0b
@@ -184,7 +184,7 @@ class SettingLoggingTest(GenericAPIView):
|
|||||||
# if http/https by this point, domain is reacheable
|
# if http/https by this point, domain is reacheable
|
||||||
return Response(status=status.HTTP_202_ACCEPTED)
|
return Response(status=status.HTTP_202_ACCEPTED)
|
||||||
|
|
||||||
if protocol is 'udp':
|
if protocol == 'udp':
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
else:
|
else:
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ def test_logging_aggregator_connection_test_requires_superuser(post, alice):
|
|||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_logging_aggregator_connection_test_not_enabled(post, admin):
|
def test_logging_aggregator_connection_test_not_enabled(post, admin):
|
||||||
url = reverse('api:setting_logging_test')
|
url = reverse('api:setting_logging_test')
|
||||||
resp = post(url, {}, user=admin, expect=400)
|
resp = post(url, {}, user=admin, expect=409)
|
||||||
assert 'Logging not enabled' in resp.data.get('error')
|
assert 'Logging not enabled' in resp.data.get('error')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user