File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1691,6 +1691,21 @@ def replica_number_from_resource_name(data_path, resc):
16911691 if dir1 : self .sess .resources .get (uniq1 ).remove ()
16921692 if dir2 : self .sess .resources .get (uniq2 ).remove ()
16931693
1694+ def test_set_and_access_data_comments__issue_450 (self ):
1695+ comment = unique_name (my_function_name (), datetime .now ()) + " issue 450"
1696+ ses = self .sess
1697+ with self .create_simple_resc () as newResc :
1698+ try :
1699+ d = ses .data_objects .create ('/{0.zone}/home/{0.username}/data_object_for_issue_450_test' .format (ses ))
1700+ d .replicate (** {kw .DEST_RESC_NAME_KW :newResc })
1701+ ses .data_objects .modDataObjMeta ({'objPath' :d .path , 'rescHier' :ses .resources .get (newResc ).hierarchy_string },
1702+ {'dataComments' :comment })
1703+ d = ses .data_objects .get (d .path )
1704+ repl = [r for r in d .replicas if r .resource_name == newResc ][0 ]
1705+ self .assertEqual (repl .comments , comment )
1706+ finally :
1707+ d .unlink (force = True )
1708+
16941709if __name__ == '__main__' :
16951710 # let the tests find the parent irods lib
16961711 sys .path .insert (0 , os .path .abspath ('../..' ))
You can’t perform that action at this time.
0 commit comments