Commit 02311eab authored by Kevin Morris's avatar Kevin Morris
Browse files


IMPORTANT: This test completely wipes out the database it's using.
Make sure you've got AUR_CONFIG set to a test database configuration!

Signed-off-by: Kevin Morris's avatarKevin Morris <>
parent 8a47afd2
import pytest
import aurweb.config
import aurweb.db
import aurweb.initdb
from aurweb.models.account_type import AccountType
from aurweb.schema import metadata
from aurweb.testing import setup_test_db
def setup():
tables = metadata.tables.keys()
for table in tables:
aurweb.db.session.execute(f"DROP TABLE IF EXISTS {table}")
def test_run():
class Args:
use_alembic = True
verbose = False
assert aurweb.db.session.query(AccountType).filter(
AccountType.AccountType == "User").first() is not None
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment