a few more tweaks
[tests.git] / system / TestUserSfa.py
index 49eb7eb..d0bf3c8 100644 (file)
@@ -17,13 +17,15 @@ class TestUserSfa:
 
     def sfi_path(self): return self.test_auth_sfa.sfi_path()
     def qualified(self,name): return self.test_auth_sfa.qualified(name)
+    def sfi_pi(self,*args,**kwds): return self.test_auth_sfa.sfi_pi(*args, **kwds)
+    def sfi_user(self,*args,**kwds): return self.test_auth_sfa.sfi_user(*args, **kwds)
 
     # xxx todo - not the right place any longer - or is it ?
     def sfa_add_user (self,options):
         "add a regular user using sfi add"
         sfi_add_options = self.user_spec['sfi_options']
         user_hrn = self.qualified(self.user_spec['name'])
-        command="sfi -d %s add"%(self.sfi_path())
+        command="%s add"%(self.sfi_path())
         command += " --type user"
         command += " --xrn %s"%user_hrn
         command += " --email %s"%self.user_spec['email']
@@ -32,7 +34,7 @@ class TestUserSfa:
         # handle key separately because of embedded whitespace
         # hack - the user's pubkey is avail from his hrn
         command += " -k %s/%s.pub"%(self.sfi_path(),user_hrn)
-       return self.test_plc.run_in_guest(command)==0
+       return self.test_plc.run_in_guest(self.sfi_pi(command))==0
 
     def sfa_update_user (self,options):
         "update a user record using sfi update"
@@ -42,7 +44,7 @@ class TestUserSfa:
 
     def sfa_delete_user(self,options):
        "run sfi delete on user record"
-       auth=self.test_auth_sfa.root_hrn()
+        user_hrn = self.qualified(self.user_spec['name'])
+        command="remove -t user %s"%user_hrn
        return \
-            self.test_plc.run_in_guest("sfi -d %s remove -t user %s.%s.%s"%(
-                self.sfi_path(),auth,self.login_base,self.regularuser))==0
+            self.test_plc.run_in_guest(self.sfi_pi(command))==0