Initial unit tests against our Sanic app

Refs #50

I had to disable the build metadata function to get these tests to work
sensibly. I need to completely rethink how that mechanism works.
This commit is contained in:
Simon Willison 2017-11-11 09:47:59 -08:00
commit 407795b612
3 changed files with 65 additions and 2 deletions

View file

@ -34,7 +34,7 @@ SQL_TIME_LIMIT_MS = 1000
connections = threading.local()
def ensure_build_metadata(files, regenerate=False):
def ensure_build_metadata(files, regenerate=True):
build_metadata = app_root / BUILD_METADATA
if build_metadata.exists() and not regenerate:
return json.loads(build_metadata.read_text())