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 VLANFactory and test_bulk_edit_objects_with_constrained_permission #3177

Merged
merged 5 commits into from
Jan 30, 2023

Conversation

glennmatthews
Copy link
Contributor

@glennmatthews glennmatthews commented Jan 27, 2023

Closes: #N/A

What's Changed

  • Update VLANFactory to use longer and more "realistic" names (originally implemented as part of, but then backed out of Increase vlan.name max_length to 255 #3173)
  • This factory change to the test data uncovered a failure case in BulkEditObjectsViewTestCase.test_bulk_edit_objects_with_constrained_permission - namely, if the objects that it selects to bulk-edit already have an attribute set to the bulk-edit target value for this attribute, then the permission constraint that it defines will forbid editing these objects, causing the test to fail.
    • I've revised the test so that it now explicitly selects objects that are not set to the bulk-edit target value, and ensures that all of these objects are included in the permission constraint as permitted.

TODO

  • Explanation of Change(s)
  • Added change log fragment(s) (for more information see the documentation)
  • n/a Attached Screenshots, Payload Example
  • Unit, Integration Tests
  • n/a Documentation Updates (when adding/changing features)
  • n/a Example Plugin Updates (when adding/changing features)
  • Outline Remaining Work, Constraints from Design

@glennmatthews glennmatthews self-assigned this Jan 27, 2023
nautobot/ipam/factory.py Outdated Show resolved Hide resolved
@bryanculver bryanculver added the type: housekeeping Changes to the application which do not directly impact the end user label Jan 30, 2023
@gsnider2195 gsnider2195 self-requested a review January 30, 2023 18:20
Copy link
Contributor

@gsnider2195 gsnider2195 left a comment

Choose a reason for hiding this comment

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

Thank you! The documentation makes this test so much clearer.

@glennmatthews glennmatthews merged commit 1a6144f into develop Jan 30, 2023
@glennmatthews glennmatthews deleted the gfm-issue-3171-continued branch January 30, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: housekeeping Changes to the application which do not directly impact the end user
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants