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

Update test test_bulk_delete_form_contains_all_filtered failure message #4552

Closed
gsnider2195 opened this issue Sep 28, 2023 · 0 comments · Fixed by #4580
Closed

Update test test_bulk_delete_form_contains_all_filtered failure message #4552

gsnider2195 opened this issue Sep 28, 2023 · 0 comments · Fixed by #4580
Assignees
Labels
type: housekeeping Changes to the application which do not directly impact the end user

Comments

@gsnider2195
Copy link
Contributor

Proposed Changes

nautobot.core.testing.views.ViewTestCases.BulkDeleteObjectsViewTestCase.test_bulk_delete_form_contains_all_filtered fails with the following message when fewer than 3 objects are returned from the test's _get_queryset():

======================================================================
ERROR: test_bulk_delete_form_contains_all_filtered (nautobot_device_onboarding.tests.test_views.OnboardingTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/test/utils.py", line 387, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/nautobot/core/testing/views.py", line 1224, in test_bulk_delete_form_contains_all_filtered
    third_pk = next(pk_iter)
StopIteration

We need to update this test so that the error message is more clear about what is broken and how to fix it.

Justification

Developer experience

@gsnider2195 gsnider2195 added type: housekeeping Changes to the application which do not directly impact the end user triage This issue is new and has not been reviewed. labels Sep 28, 2023
@glennmatthews glennmatthews removed the triage This issue is new and has not been reviewed. label Sep 29, 2023
@glennmatthews glennmatthews self-assigned this Sep 29, 2023
glennmatthews added a commit that referenced this issue Oct 3, 2023
* Fix #4552 - improve test failure messages

* Update changes/4552.housekeeping

Co-authored-by: Hanlin Miao <46973263+HanlinMiao@users.noreply.github.com>

---------

Co-authored-by: Hanlin Miao <46973263+HanlinMiao@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: housekeeping Changes to the application which do not directly impact the end user
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants