Skip to content

Commit d3e0c40

Browse files
committed
Linted
1 parent 7761ecd commit d3e0c40

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

backend/app/tests/crud/documents/_utils.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
from pathlib import Path
44

55
from sqlmodel import Session, delete
6-
from sqlalchemy.exc import IntegrityError
7-
from sqlalchemy.dialects.sqlite import insert
86

9-
from app.crud import DocumentCrud
107
from app.core.config import settings
118
from app.crud.user import get_user_by_email
12-
from app.models import Document, UserCreate
9+
from app.models import Document
1310

1411
@ft.cache
1512
def get_user_id_by_email(session: Session):
@@ -25,14 +22,12 @@ def rm_documents(session: Session):
2522
session.commit()
2623

2724
def insert_documents(session: Session, n: int):
28-
crud = DocumentCrud(session)
29-
docs = DocumentMaker(session)
30-
31-
for (_, d) in zip(range(n), docs):
32-
session.add(d)
25+
documents = DocumentMaker(session)
26+
for (_, doc) in zip(range(n), documents):
27+
session.add(doc)
3328
session.commit()
34-
session.refresh(d)
35-
yield d
29+
session.refresh(doc)
30+
yield doc
3631

3732
def insert_document(session: Session):
3833
(document, ) = insert_documents(session, 1)

backend/app/tests/crud/documents/test_read_many.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from sqlmodel import Session
33

44
from app.crud import DocumentCrud
5-
from app.core.config import settings
65

76
from _utils import (
87
Constants,

backend/app/tests/crud/documents/test_update.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
from uuid import UUID
2-
from typing import ClassVar
3-
41
import pytest
52
from sqlmodel import Session
63

0 commit comments

Comments
 (0)