Skip to content

Commit

Permalink
fix rebase develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize committed Jul 24, 2024
1 parent e35a221 commit 9d6a557
Show file tree
Hide file tree
Showing 4 changed files with 11,157 additions and 3,279 deletions.
2 changes: 1 addition & 1 deletion backend/geonature/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def create_app(with_external_mods=True):
if "CELERY" in app.config:
from geonature.utils.celery import celery_app

celery_app.init_app(app)
# celery_app.init_app(app)
celery_app.conf.update(app.config["CELERY"])

# Emails configuration
Expand Down
2 changes: 2 additions & 0 deletions backend/geonature/tests/imports/test_imports_occhab.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def imported_import(client, prepared_import):
with logged_user(client, imprt.authors[0]):
r = client.post(url_for("import.import_valid_data", import_id=imprt.id_import))
assert r.status_code == 200, r.data

db.session.refresh(imprt)
return imprt

Expand All @@ -183,6 +184,7 @@ def imported_import(client, prepared_import):
class TestImportsOcchab:
@pytest.mark.parametrize("import_file_name", ["valid_file.csv"])
def test_import_valid_file(self, imported_import):

assert_import_errors(
imported_import,
{
Expand Down
5 changes: 2 additions & 3 deletions backend/geonature/utils/celery.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from celery import Celery
import flask
from geonature.utils.env import db


class FlaskCelery(Celery):
Expand Down Expand Up @@ -33,7 +32,7 @@ def __call__(self, *args, **kwargs):

def init_app(self, app):
self.app = app
self.config_from_object(app.config)
self.config_from_object(app.config["CELERY"])

Check warning on line 35 in backend/geonature/utils/celery.py

View check run for this annotation

Codecov / codecov/patch

backend/geonature/utils/celery.py#L35

Added line #L35 was not covered by tests


celery_app = FlaskCelery("geonature")
celery_app = Celery("geonature") # FIX ME
Loading

0 comments on commit 9d6a557

Please sign in to comment.