-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This update significantly enhances test execution efficiency by invoking the `migrate_db` function just once for all tests. This optimization is accomplished by maintaining database changes in memory, rather than persisting them with `db.commit()`. Consequently, it is essential to expire all objects in scenarios where `db.commit()` would have been typically used. This approach introduces minimal overhead, given the limited number and frequency of object interactions during testing. Additionally, some test cases have been modified to accommodate this change. They now rely on dynamic ids returned from the backend instead of static ids. With the database no longer resetting after each test, ids now increment continuously, necessitating this adjustment.
- Loading branch information
1 parent
1bc5a44
commit 30afd57
Showing
3 changed files
with
31 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters