@@ -542,6 +542,43 @@ def test_iRODSAccess_cannot_be_constructed_using_unsupported_type__issue_558(sel
542542 self .sess ,
543543 )
544544
545+ def test_atomic_acls_505 (self ):
546+ #import pdb;pdb.set_trace()
547+ ses = self .sess
548+ zone = user1 = user2 = group = None
549+ try :
550+ zone = ses .zones .create ("twilight" ,"remote" )
551+ user1 = ses .users .create ("test_user_505" , "rodsuser" )
552+ user2 = ses .users .create ("rod_serling_505#twilight" , "rodsuser" )
553+ group = ses .groups .create ("test_group_505" )
554+ ses .acls ._call_atomic_acl_api (
555+ self .coll_path ,
556+ a1 := iRODSAccess ("write" , "" , user1 .name , user1 .zone ),
557+ a2 := iRODSAccess ("read" , "" , user2 .name , user2 .zone ),
558+ a3 := iRODSAccess ("read" , "" , group .name ),
559+ )
560+
561+ accesses = ses .acls .get (self .coll )
562+
563+ # For purposes of equality tests, assign the path name of interest into each ACL.
564+ for p in (a1 , a2 , a3 ):
565+ p .path = self .coll_path
566+
567+ # Assert that the ACLs we added are among those listed for the object in the catalog.
568+ normalize = lambda access : access .copy (decanonicalize = True , ref_zone = ses .zone )
569+ self .assertLess (
570+ set (normalize (_ ) for _ in (a1 ,a2 ,a3 )),
571+ set (normalize (_ ) for _ in accesses )
572+ )
573+ finally :
574+ if user1 :
575+ user1 .remove ()
576+ if user2 :
577+ user2 .remove ()
578+ if group :
579+ group .remove ()
580+ if zone :
581+ zone .remove ()
545582
546583if __name__ == "__main__" :
547584 # let the tests find the parent irods lib
0 commit comments