-
Notifications
You must be signed in to change notification settings - Fork 49
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
fix(management,merge_attributes): allow target attributes with descendants #1127
Conversation
…dants Signed-off-by: David Wallace <[email protected]>
@@ -55,14 +55,15 @@ def handle(self, *args, **options): | |||
verbosity = options.get('verbosity', 1) | |||
|
|||
source = get_valid_attribute(source, message_name='Source') | |||
target = get_valid_attribute(target, message_name='Target') | |||
target = get_valid_attribute(target, message_name='Target', allow_descendants=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is main part of the change
@@ -121,16 +124,65 @@ def _create_new_merge_attributes_and_views(db, settings): | |||
create_copy_of_view_that_uses_new_attribute(db, NEW_MERGE_URI_PREFIXES) | |||
|
|||
|
|||
@pytest.mark.usefixtures("_create_new_merge_attributes_and_views") | |||
def test_command_merge_attributes_fails_correctly(db, settings): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some test for when it should fail because the input source or target was wrong
Signed-off-by: David Wallace <[email protected]>
Ive updated the style and tests have passed. This can be merged right? |
Go for it. I think I approved before you asked for it. |
yes ;) , thanks for review! |
merge_attributes
, addallow_descendants=True
for thetarget
attributetest_command_merge_attributes_fails_correctly
Description
Related issue: #990
Motivation and Context
How has this been tested?
Screenshots (if appropriate)
Types of Changes
Checklist