feat: Initial commit with full deployment architecture and scripts
This commit is contained in:
commit
abb3efe114
96 files changed
+16789
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import pytest
|
||||
from app import create_app, db
|
||||
from app.models import User
|
||||
|
||||
@pytest.fixture
|
||||
def app():
|
||||
app = create_app('testing')
|
||||
with app.app_context():
|
||||
db.create_all()
|
||||
yield app
|
||||
db.session.remove()
|
||||
db.drop_all()
|
||||
|
||||
@pytest.fixture
|
||||
def client(app):
|
||||
return app.test_client()
|
||||
|
||||
@pytest.fixture
|
||||
def admin_headers():
|
||||
return {
|
||||
'X-Username': 'admin',
|
||||
'X-Role': 'admin',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
@pytest.fixture
|
||||
def user_headers():
|
||||
return {
|
||||
'X-Username': 'user',
|
||||
'X-Role': 'user',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
Reference in new issue
Block a user