-
Notifications
You must be signed in to change notification settings - Fork 75
[#709] preserve options in chaining obj.metadata(opt1=val1)(opt2=val2) #716
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -796,6 +796,28 @@ def test_xml_mode_addresses_odd_metadata_characters__issue_582(self): | |
# in use, with the "odd" characters being present in the metadata value. | ||
del obj.metadata[attr_str] | ||
|
||
def test_cascading_changes_of_metadata_manager_options__issue_709(self): | ||
d = None | ||
try: | ||
d = self.sess.data_objects.create(f'{self.coll.path}/issue_709_test_1') | ||
m = d.metadata | ||
self.assertEqual(m._manager._admin,False) | ||
|
||
m2 = m(admin = True) | ||
self.assertEqual(m2._manager._use_ts,False) | ||
self.assertEqual(m2._manager._admin,True) | ||
|
||
m3 = m2(timestamps = True) | ||
self.assertEqual(m3._manager._use_ts, True) | ||
self.assertEqual(m3._manager._admin, True) | ||
self.assertEqual(m3._manager.get_api_keywords().get(kw.ADMIN_KW), "") | ||
|
||
m4 = m3(admin = False) | ||
self.assertEqual(m4._manager._use_ts, True) | ||
self.assertEqual(m4._manager.get_api_keywords().get(kw.ADMIN_KW), None) | ||
Comment on lines
+815
to
+817
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I take it the following assertion is left out intentionally? self.assertEqual(m4._manager._admin, False) Does L817 cover it somehow? Seems like the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can put that in. Not sure why it got left out. |
||
finally: | ||
if d: | ||
d.unlink(force=True) | ||
|
||
if __name__ == "__main__": | ||
# let the tests find the parent irods lib | ||
|
Uh oh!
There was an error while loading. Please reload this page.