reviewed list options parsing
[tests.git] / system / TestUserSfa.py
1 # Thierry Parmentelat <thierry.parmentelat@inria.fr>
2 # Copyright (C) 2010 INRIA 
3 #
4 import os, sys, time
5 import xmlrpclib
6
7 import utils
8
9 class TestUserSfa:
10
11     def __init__ (self,test_plc,plc_spec_sfa):
12         self.test_plc=test_plc
13         self.spec_sfa=plc_spec_sfa
14
15     def name(self):
16         return self.user_spec['user_fields']['email']
17
18     def add_user (self):
19         return \
20         self.test_plc.run_in_guest("sfi.py -d /root/.sfi/ add  person.xml")==0
21
22     def update_user (self):
23         return \
24         self.test_plc.run_in_guest("sfi.py -d /root/.sfi/ update  person.xml")==0
25
26     def delete_user(self):
27         auth=self.spec_sfa['SFA_REGISTRY_ROOT_AUTH']
28         return \
29         self.test_plc.run_in_guest("sfi.py -d /root/.sfi/ remove -t user %s.main.sfafakeuser1"%auth)==0
30