mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
housekeep: centralize datetime generation
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
7bcc8d7ce7
commit
7f6c23d4cb
41 changed files with 146 additions and 179 deletions
|
@ -13,7 +13,7 @@ from fastapi.testclient import TestClient
|
|||
|
||||
import aurweb.models.account_type as at
|
||||
|
||||
from aurweb import captcha, db, logging
|
||||
from aurweb import captcha, db, logging, time
|
||||
from aurweb.asgi import app
|
||||
from aurweb.db import create, query
|
||||
from aurweb.models.accepted_term import AcceptedTerm
|
||||
|
@ -155,7 +155,7 @@ def test_post_passreset_user(client: TestClient, user: User):
|
|||
def test_post_passreset_resetkey(client: TestClient, user: User):
|
||||
with db.begin():
|
||||
user.session = Session(UsersID=user.ID, SessionID="blah",
|
||||
LastUpdateTS=datetime.utcnow().timestamp())
|
||||
LastUpdateTS=time.utcnow())
|
||||
|
||||
# Prepare a password reset.
|
||||
with client as request:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue