forked from pypi/warehouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: address randomness-related failures (pypi#15469)
* test: update test to sort the same way as code The `_simple_detail()` function has sorted the results by version, then filename, so update test conditions to sort similarly as well. Exposed with: --randomly-seed=105155306 --randomly-seed=1843708888 --randomly-seed=19699634 Signed-off-by: Mike Fiedler <miketheman@gmail.com> * test: actually assert things Signed-off-by: Mike Fiedler <miketheman@gmail.com> * test: use a paginated page in test Other tests paginating expect a page-like object instead of the list of items, so supply one. Exposed via: --randomly-seed=3227833760 --randomly-seed=235656747 Signed-off-by: Mike Fiedler <miketheman@gmail.com> * test: remove db-controlled sequence from factory When using `factory.Sequence()` for a database-controlled sequence column, we can get into a weird state where we're reusing the sequence since we've flushed already. Since we already rely on the database to generate the ID for us, we don't have to supply it ourselves as part of the factory. If we ever *do* want to set a specific id for a JournalEntry, we would use a keyword argument like `JournalEntryFactory.create(id=...)` Exposed via: --randomly-seed=2329742959 Signed-off-by: Mike Fiedler <miketheman@gmail.com> --------- Signed-off-by: Mike Fiedler <miketheman@gmail.com>
- Loading branch information
1 parent
675794b
commit 874c3b2
Showing
3 changed files
with
30 additions
and
14 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