mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-07-01 14:25:46 +00:00
tests: cleanup test code
- remove unused imports in test cases - fix code smells and code style in conftest.py
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
import pytest
|
||||
|
||||
def test_log_disabled(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://nginx-proxy.test/port")
|
||||
assert r.status_code == 200
|
||||
|
@ -1,5 +1,3 @@
|
||||
import pytest
|
||||
|
||||
def test_log_format(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://nginx-proxy.test/port")
|
||||
assert r.status_code == 200
|
||||
|
@ -1,5 +1,3 @@
|
||||
import pytest
|
||||
|
||||
def test_log_json(docker_compose, nginxproxy):
|
||||
log_conf = [line for line in nginxproxy.get_conf().decode('ASCII').splitlines() if "log_format vhost escape=" in line]
|
||||
assert "{\"time_local\":\"$time_iso8601\"," in log_conf[0]
|
||||
|
@ -1,5 +1,3 @@
|
||||
import pytest
|
||||
|
||||
def test_log_json_format(docker_compose, nginxproxy):
|
||||
log_conf = [line for line in nginxproxy.get_conf().decode('ASCII').splitlines() if "log_format vhost escape=" in line]
|
||||
assert "{\"time_local\":\"$time_iso8601\"," in log_conf[0]
|
||||
|
Reference in New Issue
Block a user