mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-08 15:46:42 +02:00
test: Refactor args tests to use local webserver instead of remote requests
This commit is contained in:
@@ -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)
|
Reference in New Issue
Block a user