test: update tests to work with TUVote.Decision

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-03-07 22:19:24 -08:00
parent a29701459c
commit cf4ab696d0
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
2 changed files with 10 additions and 7 deletions

View file

@ -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