split models and db from init

Move models into their own file
Move db functions into their own file
Update tests
This commit is contained in:
Brian Martin 2019-06-19 09:29:45 -04:00
parent 76528d1500
commit 58b3567887
11 changed files with 1064 additions and 981 deletions

View file

@ -7,6 +7,7 @@ import json
import tinydb
import pytest_aiohttp
import pytest_asyncio
import datetime, time
from aiohttp import web
@ -42,6 +43,19 @@ async def test_confserver_no_ssl():
conf_server.confserver_app()
asyncio.create_task(conf_server.start_server())
def test_get_milli_time():
cserv = create_confserver()
assert (
cserv.get_milli_time(
datetime.datetime(
2018, 1, 1, 1, 0, 0, 0, tzinfo=datetime.timezone.utc
).timestamp()
)
== 1514768400000
)
# Comment out test_base until api changes are complete
""" async def test_base(aiohttp_client):
remove_existing_db()