Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses workaround for test that fails ~sometimes~ #3419

Merged
merged 2 commits into from
Aug 26, 2024
Merged

Uses workaround for test that fails ~sometimes~ #3419

merged 2 commits into from
Aug 26, 2024

Conversation

mouse-reeve
Copy link
Member

@mouse-reeve mouse-reeve commented Aug 26, 2024

Description

This test sometimes return with items in the wrong order, so hopefully this will make the order irrelevant and allow the test to pass reliably.

What type of Pull Request is this?

  • Bug Fix
  • Enhancement
  • Plumbing / Internals / Dependencies
  • Refactor

Does this PR change settings or dependencies, or break something?

  • This PR changes or adds default settings, configuration, or .env values
  • This PR changes or adds dependencies
  • This PR introduces other breaking changes

Details of breaking or configuration changes (if any of above checked)

Documentation

  • New or amended documentation will be required if this PR is merged
  • I have created a matching pull request in the Documentation repository
  • I intend to create a matching pull request in the Documentation repository after this PR is merged

Tests

  • My changes do not need new tests
  • All tests I have added are passing
  • I have written tests but need help to make them pass
  • I have not written tests and need help to write them

@@ -65,25 +65,28 @@ def test_create_job(self, *_):

import_items = models.ImportItem.objects.filter(job=import_job).all()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work but it is a bit whacky. Would it work better/as well to just order the queryset and keep the existing asserts?

import_items = models.ImportItem.objects.filter(job=import_job).all().order_by("id")
``

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah that is way simpler!

@mouse-reeve mouse-reeve merged commit df607a0 into main Aug 26, 2024
10 checks passed
@mouse-reeve mouse-reeve deleted the test-fix branch August 26, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants