Skip to content

Commit

Permalink
feat: Enable atomic transactions (#2288)
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Apr 29, 2024
1 parent 854e47b commit 00fe5cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions example_project/portal_test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"NAME": os.path.join(
os.path.abspath(os.path.dirname(__file__)), "db.sqlite3"
), # Or path to database file if using sqlite3.
"ATOMIC_REQUESTS": True,
}
}

Expand Down
1 change: 1 addition & 0 deletions example_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"NAME": os.path.join(
os.path.abspath(os.path.dirname(__file__)), "db.sqlite3"
), # Or path to database file if using sqlite3.
"ATOMIC_REQUESTS": True,
}
}

Expand Down
1 change: 1 addition & 0 deletions portal/tests/test_emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def test_newsletter_calls_correct_requests(mocker, monkeypatch):
mocked_add_to_address_book.assert_called_once()


@pytest.mark.django_db
def test_newsletter_get_not_allowed():
c = Client()

Expand Down

0 comments on commit 00fe5cd

Please sign in to comment.