Skip to content

Commit

Permalink
fix import in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoLechemia committed Aug 9, 2023
1 parent 18d7b64 commit 29c288a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions apptax/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def liste():

@pytest.fixture
def noms_example(attribut_example, liste):
_liste = BibListes.query.filter_by(code_liste=liste.code_liste).one()
taxref_obj = []
with db.session.begin_nested():
for cd_nom, cd_ref, nom_francais, comments, attr in bibnom_exemple:
Expand All @@ -78,7 +77,7 @@ def noms_example(attribut_example, liste):
)
nom.attributs.append(cor_attr)
db.session.add(nom)
_liste.noms.append(nom)
liste.noms.append(nom)
taxref_obj.append(nom)
return taxref_obj

Expand Down
2 changes: 1 addition & 1 deletion apptax/tests/test_bib_noms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from flask import url_for

from .fixtures import noms_example, attribut_example
from .fixtures import noms_example, attribut_example, liste


@pytest.mark.usefixtures("client_class", "temporary_transaction")
Expand Down
2 changes: 1 addition & 1 deletion apptax/tests/test_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
from pypnusershub.tests.utils import set_logged_user_cookie

from .fixtures import noms_example, attribut_example
from .fixtures import noms_example, attribut_example, liste


@pytest.fixture
Expand Down

0 comments on commit 29c288a

Please sign in to comment.