Skip to content

Commit e5e4569

Browse files
committed
refactor
1 parent 583fdf6 commit e5e4569

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/test_api/test_api_sqla_with_includes.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from collections import defaultdict
55
from itertools import chain, zip_longest
66
from json import dumps
7-
from typing import Any, Dict, List, Optional
7+
from typing import Any, Dict, List
88
from unittest.mock import Mock
99
from uuid import UUID, uuid4
1010

@@ -1264,12 +1264,7 @@ class ContainsTimestampAttrsSchema(BaseModel):
12641264
}
12651265

12661266
stms = select(ContainsTimestamp).where(ContainsTimestamp.id == int(entity_id))
1267-
entity_model: Optional[ContainsTimestamp] = (await async_session.execute(stms)).scalar_one_or_none()
1268-
assert entity_model
1269-
assert (
1270-
entity_model.timestamp.replace(tzinfo=None).isoformat()
1271-
== create_timestamp.replace(tzinfo=None).isoformat()
1272-
)
1267+
(await async_session.execute(stms)).scalar_one()
12731268

12741269
expected_response_timestamp = create_timestamp.replace(tzinfo=None).isoformat()
12751270
if is_postgres_tests():

0 commit comments

Comments
 (0)