From fd264631c4b7636e46f507e005cc9263441993ef Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 17 Sep 2015 07:45:12 +0200 Subject: [PATCH] Move httpbin data to data/ instead of html/. --- tests/integration/html/hello.html | 1 - tests/integration/test_webserver.py | 2 +- tests/integration/webserver.py | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 tests/integration/html/hello.html diff --git a/tests/integration/html/hello.html b/tests/integration/html/hello.html deleted file mode 100644 index 257cc5642..000000000 --- a/tests/integration/html/hello.html +++ /dev/null @@ -1 +0,0 @@ -foo diff --git a/tests/integration/test_webserver.py b/tests/integration/test_webserver.py index ecb6680a9..7954ad36b 100644 --- a/tests/integration/test_webserver.py +++ b/tests/integration/test_webserver.py @@ -8,7 +8,7 @@ import pytest ('/', 'httpbin(1): HTTP Client Testing Service', True), # https://github.com/Runscope/httpbin/issues/245 ('/', 'www.google-analytics.com', False), - ('/html/hello.html', 'Hello World!', True), + ('/data/hello.txt', 'Hello World!', True), ]) def test_httpbin(httpbin, qtbot, path, content, expected): with qtbot.waitSignal(httpbin.got_new_url, raising=True, timeout=100): diff --git a/tests/integration/webserver.py b/tests/integration/webserver.py index 4814953c0..2d5fd4edb 100644 --- a/tests/integration/webserver.py +++ b/tests/integration/webserver.py @@ -5,11 +5,11 @@ from httpbin.core import app import flask -@app.route('/html/') -def send_html(path): +@app.route('/data/') +def send_data(path): basedir = os.path.realpath(os.path.dirname(__file__)) print(basedir) - return flask.send_from_directory(os.path.join(basedir, 'html'), path) + return flask.send_from_directory(os.path.join(basedir, 'data'), path) app.run(port=int(sys.argv[1]), debug=True, use_reloader=False)