test: Refactor args tests to use local webserver instead of remote requests

This commit is contained in:
Cristian 2020-07-13 09:39:43 -05:00
parent bf417f50a4
commit 8f2543fa61
4 changed files with 458 additions and 10 deletions

View file

@ -1,8 +1,17 @@
from bottle import route, run
from os.path import abspath
from os import getcwd
from pathlib import Path
@route('/')
from bottle import route, run, static_file
@route("/")
def index():
return "Hello"
@route("/static/<filename>")
def static_path(filename):
template_path = abspath(getcwd()) / Path("tests/mock_server/templates")
return static_file(filename, root=template_path)
def start():
run(host='localhost', port=8080)