File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -3305,16 +3305,13 @@ def test_access_time__issue_700(self):
33053305 if self .sess .server_version < (5 ,):
33063306 self .skipTest ("iRODS servers < 5.0.0 do not provide an access_time attribute for data objects." )
33073307
3308- data_path = iRODSPath (self .coll .path ,
3309- unique_name (my_function_name (), datetime .now ())
3310- )
3311- with self .sess .data_objects .open (data_path ,"w" ) as f :
3312- f .write (b'_' )
3313- with self .sess .data_objects .open (data_path ,"r" ) as f :
3314- f .read ()
3308+ # Create a new, uniquely named test data object.
3309+ data = self .sess .data_objects .create (
3310+ f'{ helpers .home_collection (self .sess )} /{ unique_name (my_function_name (), datetime .now ())} '
3311+ )
33153312
3316- data = self . sess . data_objects . get ( data_path )
3317- self .assertGreaterEqual ( data .access_time , data . modify_time )
3313+ # Test that access_time is there, and of the right type.
3314+ self .assertIs ( type ( data .access_time ), datetime )
33183315
33193316if __name__ == "__main__" :
33203317 # let the tests find the parent irods lib
You can’t perform that action at this time.
0 commit comments