Reverse static arguments

This commit is contained in:
Channel Cat
2016-10-25 02:45:28 -07:00
parent ee70f1e55e
commit 74ae0007d3
8 changed files with 17 additions and 14 deletions

View File

@@ -156,7 +156,7 @@ def test_bp_static():
app = Sanic('test_static')
blueprint = Blueprint('test_static')
blueprint.static(current_file, '/testing.file')
blueprint.static('/testing.file', current_file)
app.blueprint(blueprint)

View File

@@ -10,7 +10,7 @@ def test_static_file():
current_file_contents = file.read()
app = Sanic('test_static')
app.static(current_file, '/testing.file')
app.static('/testing.file', current_file)
request, response = sanic_endpoint_test(app, uri='/testing.file')
assert response.status == 200
@@ -23,7 +23,7 @@ def test_static_directory():
current_file_contents = file.read()
app = Sanic('test_static')
app.static(current_directory, '/dir')
app.static('/dir', current_directory)
request, response = sanic_endpoint_test(app, uri='/dir/test_static.py')
assert response.status == 200