Skip to content

Commit 7744dde

Browse files
committed
[_3,_700] draw back expectations for access_time test
1 parent ff808aa commit 7744dde

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

irods/test/data_obj_test.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff 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

33193316
if __name__ == "__main__":
33203317
# let the tests find the parent irods lib

0 commit comments

Comments
 (0)