small fix for reliability and comment
This commit is contained in:
@@ -4,14 +4,14 @@ import time
|
|||||||
from flask import url_for
|
from flask import url_for
|
||||||
from .util import live_server_setup, wait_for_all_checks
|
from .util import live_server_setup, wait_for_all_checks
|
||||||
|
|
||||||
|
# test pages with http://username@password:foobar.com/ work
|
||||||
def test_basic_auth(client, live_server, measure_memory_usage):
|
def test_basic_auth(client, live_server, measure_memory_usage):
|
||||||
|
|
||||||
live_server_setup(live_server)
|
live_server_setup(live_server)
|
||||||
|
|
||||||
# Add our URL to the import page
|
|
||||||
test_url = url_for('test_basicauth_method', _external=True).replace("//","//myuser:mypass@")
|
|
||||||
|
|
||||||
|
# This page will echo back any auth info
|
||||||
|
test_url = url_for('test_basicauth_method', _external=True).replace("//","//myuser:mypass@")
|
||||||
|
time.sleep(1)
|
||||||
res = client.post(
|
res = client.post(
|
||||||
url_for("imports.import_page"),
|
url_for("imports.import_page"),
|
||||||
data={"urls": test_url},
|
data={"urls": test_url},
|
||||||
@@ -34,4 +34,4 @@ def test_basic_auth(client, live_server, measure_memory_usage):
|
|||||||
follow_redirects=True
|
follow_redirects=True
|
||||||
)
|
)
|
||||||
|
|
||||||
assert b'myuser mypass basic' in res.data
|
assert b'myuser mypass basic' in res.data
|
||||||
|
|||||||
Reference in New Issue
Block a user