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
|
@ -1,11 +1,10 @@
|
|||
from datetime import datetime
|
||||
from logging import ERROR
|
||||
from typing import List
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from aurweb import config, db, models
|
||||
from aurweb import config, db, models, time
|
||||
from aurweb.models import Package, PackageBase, PackageRequest, User
|
||||
from aurweb.models.account_type import TRUSTED_USER_ID, USER_ID
|
||||
from aurweb.models.request_type import ORPHAN_ID
|
||||
|
@ -48,7 +47,7 @@ def user2() -> User:
|
|||
|
||||
@pytest.fixture
|
||||
def pkgbases(user: User) -> List[PackageBase]:
|
||||
now = int(datetime.utcnow().timestamp())
|
||||
now = time.utcnow()
|
||||
|
||||
output = []
|
||||
with db.begin():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue