mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-12 22:25:44 -04:00
test: Refactor args tests to use local webserver instead of remote requests
This commit is contained in:
parent
bf417f50a4
commit
8f2543fa61
4 changed files with 458 additions and 10 deletions
|
@ -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)
|
Loading…
Add table
Add a link
Reference in a new issue