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,6 @@
|
||||
import pytest
|
||||
|
||||
|
||||
def test_default_root_response(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://nginx-proxy.test/")
|
||||
assert r.status_code == 418
|
||||
|
@ -1,5 +1,3 @@
|
||||
import pytest
|
||||
|
||||
def test_root_redirects_to_web1(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get("http://www.nginx-proxy.tld/port", allow_redirects=False)
|
||||
assert r.status_code == 301
|
||||
|
@ -1,5 +1,3 @@
|
||||
import pytest
|
||||
|
||||
def test_location_precedence_case1(docker_compose, nginxproxy):
|
||||
r = nginxproxy.get(f"http://foo.nginx-proxy.test/web1/port")
|
||||
assert r.status_code == 200
|
||||
|
@ -3,6 +3,7 @@ from time import sleep
|
||||
import pytest
|
||||
from docker.errors import NotFound
|
||||
|
||||
|
||||
@pytest.mark.parametrize("stub,expected_port", [
|
||||
("nginx-proxy.test/web1", 81),
|
||||
("nginx-proxy.test/web2", 82),
|
||||
|
Reference in New Issue
Block a user