Skip to content

Commit

Permalink
tests: remove nested db session
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo authored and slint committed Nov 19, 2024
1 parent 99f8c7d commit 4bde62c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/requests/test_user_moderation_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ class MockRequestModerationTask(Task):

def apply_async(self, args=None, kwargs=None, **kwargs_):
user_id = kwargs["user_id"]
with db.session.begin_nested():
try:
current_user_moderation_service.request_moderation(
system_identity, user_id=user_id, uow=None
)
except Exception:
pass
try:
current_user_moderation_service.request_moderation(
system_identity, user_id=user_id, uow=None
)
except Exception as ex:
pass


@pytest.mark.skip(reason="Faulty test")
def test_user_moderation_approve(
running_app, mod_identity, unverified_user, es_clear, minimal_record, mocker
):
Expand Down

0 comments on commit 4bde62c

Please sign in to comment.