From 39648b4f0b3cac19616eda30c8f13170ae8f769a Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Wed, 8 Apr 2020 14:40:26 -0400 Subject: [PATCH] fix up a few test and lint errors related to external logging --- awx/conf/views.py | 2 +- awx/main/tests/functional/api/test_settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/conf/views.py b/awx/conf/views.py index ad1d62ad3a..580a0d2e52 100644 --- a/awx/conf/views.py +++ b/awx/conf/views.py @@ -184,7 +184,7 @@ class SettingLoggingTest(GenericAPIView): # if http/https by this point, domain is reacheable return Response(status=status.HTTP_202_ACCEPTED) - if protocol is 'udp': + if protocol == 'udp': s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) else: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) diff --git a/awx/main/tests/functional/api/test_settings.py b/awx/main/tests/functional/api/test_settings.py index 262befcc19..385bd32129 100644 --- a/awx/main/tests/functional/api/test_settings.py +++ b/awx/main/tests/functional/api/test_settings.py @@ -241,7 +241,7 @@ def test_logging_aggregator_connection_test_requires_superuser(post, alice): @pytest.mark.django_db def test_logging_aggregator_connection_test_not_enabled(post, admin): 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')