mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
style: Run pre-commit
This commit is contained in:
parent
b47882b114
commit
9c6c13b78a
235 changed files with 7180 additions and 5628 deletions
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
|
||||
from aurweb import db, time
|
||||
|
@ -17,9 +16,14 @@ def setup(db_test):
|
|||
@pytest.fixture
|
||||
def user() -> User:
|
||||
with db.begin():
|
||||
user = db.create(User, Username="test", Email="test@example.org",
|
||||
RealName="Test User", Passwd="testPassword",
|
||||
AccountTypeID=TRUSTED_USER_ID)
|
||||
user = db.create(
|
||||
User,
|
||||
Username="test",
|
||||
Email="test@example.org",
|
||||
RealName="Test User",
|
||||
Passwd="testPassword",
|
||||
AccountTypeID=TRUSTED_USER_ID,
|
||||
)
|
||||
yield user
|
||||
|
||||
|
||||
|
@ -27,10 +31,15 @@ def user() -> User:
|
|||
def tu_voteinfo(user: User) -> TUVoteInfo:
|
||||
ts = time.utcnow()
|
||||
with db.begin():
|
||||
tu_voteinfo = db.create(TUVoteInfo, Agenda="Blah blah.",
|
||||
User=user.Username,
|
||||
Submitted=ts, End=ts + 5,
|
||||
Quorum=0.5, Submitter=user)
|
||||
tu_voteinfo = db.create(
|
||||
TUVoteInfo,
|
||||
Agenda="Blah blah.",
|
||||
User=user.Username,
|
||||
Submitted=ts,
|
||||
End=ts + 5,
|
||||
Quorum=0.5,
|
||||
Submitter=user,
|
||||
)
|
||||
yield tu_voteinfo
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue