mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
housekeep(fastapi): rewrite test_package_blacklist
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
adafa6ebc1
commit
735c5f57cb
1 changed files with 1 additions and 10 deletions
|
@ -3,21 +3,12 @@ import pytest
|
||||||
from sqlalchemy.exc import IntegrityError
|
from sqlalchemy.exc import IntegrityError
|
||||||
|
|
||||||
from aurweb import db
|
from aurweb import db
|
||||||
from aurweb.models.package_base import PackageBase
|
|
||||||
from aurweb.models.package_blacklist import PackageBlacklist
|
from aurweb.models.package_blacklist import PackageBlacklist
|
||||||
from aurweb.models.user import User
|
|
||||||
|
|
||||||
user = pkgbase = None
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def setup(db_test):
|
def setup(db_test):
|
||||||
global user, pkgbase
|
return
|
||||||
|
|
||||||
with db.begin():
|
|
||||||
user = db.create(User, Username="test", Email="test@example.org",
|
|
||||||
RealName="Test User", Passwd="testPassword")
|
|
||||||
pkgbase = db.create(PackageBase, Name="test-package", Maintainer=user)
|
|
||||||
|
|
||||||
|
|
||||||
def test_package_blacklist_creation():
|
def test_package_blacklist_creation():
|
||||||
|
|
Loading…
Add table
Reference in a new issue