mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
test: update tests to work with TUVote.Decision
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
a29701459c
commit
cf4ab696d0
2 changed files with 10 additions and 7 deletions
|
@ -5,6 +5,7 @@ import pytest
|
|||
from aurweb import config, db, time
|
||||
from aurweb.models import TUVote, TUVoteInfo, User
|
||||
from aurweb.models.account_type import TRUSTED_USER_ID
|
||||
from aurweb.models.tu_vote import YES_ID
|
||||
from aurweb.scripts import tuvotereminder as reminder
|
||||
from aurweb.testing.email import Email
|
||||
|
||||
|
@ -13,7 +14,8 @@ aur_location = config.get("options", "aur_location")
|
|||
|
||||
def create_vote(user: User, voteinfo: TUVoteInfo) -> TUVote:
|
||||
with db.begin():
|
||||
vote = db.create(TUVote, User=user, VoteID=voteinfo.ID)
|
||||
vote = db.create(TUVote, User=user, VoteID=voteinfo.ID,
|
||||
Decision=YES_ID)
|
||||
return vote
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue