def __init__(self): """ """ self._am = Authentication.AccountManager() self._scp = ConfigParser.SafeConfigParser() #settings file name settingsFile = 'settings.cfg' #The file path of the settings file self._filePath = os.path.expanduser('~') + '/.' + settingsFile #config file to read self._scp.read(self._filePath) #Currently set account self._account = None #if there's a persisted setting to use a particular account if self._scp.get('acc_info', 'has_default') == "True": accountName = self._scp.get('acc_info', 'account') #if the account is still available in DBus if accountName in self._am.get_accounts(): self._account = self._am.get_accounts()[accountName] #if there's no default account set else: #get the default account self._account = self._am.get_accounts().itervalues().next()
def setUp(self): """Sets up the development environment """ import Authentication import GDocs import Configuration import gdata.docs.client self._confMan = Configuration.ConfigurationManager() self._am = Authentication.AccountManager() self._gdcm = GDocs.GDClientManager(self._confMan) self._gdam = GDocs.GDActionsManager(self._gdcm)
def __init__(self): """ """ #Create instances of all the classes self._confMan = Configuration.ConfigurationManager() self._gdcm = GDocs.GDClientManager(self._confMan) self._gdam = GDocs.GDActionsManager(self._gdcm) self._accMan = Authentication.AccountManager() account = self._confMan.get_account() self._gdcm.authenticate_client(account)
def setUp(self): """Sets up the test case environment """ import Authentication import GDocs import gdata.docs.client import Configuration self._confMan = Configuration.ConfigurationManager() self._gdcManger = GDocs.GDClientManager(self._confMan) self._am = Authentication.AccountManager() self._gdcm = GDocs.GDClientManager(self._confMan)
def setUp(self): """Sets up the test case environment """ import Authentication self._am = Authentication.AccountManager()