Initial checkin

This commit is contained in:
2023-05-18 18:21:00 -04:00
commit 1c64f16aef
21 changed files with 1020 additions and 0 deletions

24
test/__init__.py Normal file
View File

@@ -0,0 +1,24 @@
import os
import tempfile
import pytest
from app import create_app, db, Vehicle
from flask import json
@pytest.fixture
def client():
app = create_app()
db_fd, app.config['DATABASE'] = tempfile.mkstemp()
app.config['TESTING'] = True
client = app.test_client()
with app.app_context():
db.drop_all()
db.create_all()
yield client
os.close(db_fd)
os.unlink(app.config['DATABASE'])