示例#1
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.client.GDClient()
     self.client.api_version = '2'
     conf.configure_client(self.client, 'VersionTwoClientContactsTest', 'cp')
   self.old_proxy = os.environ.get('https_proxy')
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.docs.client.DocsClient()
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client, 'DocsTest', self.client.auth_service)
示例#3
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.docs.client.DocsClient()
     self.client.ssl = conf.options.get_value('ssl') == 'true'
     conf.configure_client(self.client, 'DocsTest', self.client.auth_service)
     conf.configure_cache(self.client, 'testDocsRevisions')
     try:
       self.testdoc = self.client.Create(
           gdata.docs.data.DOCUMENT_LABEL, 'My Doc')
       # Because of an etag change issue, we must sleep for a few seconds
       time.sleep(10)
     except:
       self.tearDown()
       raise
     try:
       self.testdoc = self.client.GetDoc(self.testdoc.resource_id.text)
       self.testfile = self.client.Upload(
           'test.bin', 'My Binary File', content_type='application/octet-stream')
       # Because of an etag change issue, we must sleep for a few seconds
       time.sleep(10)
       self.testfile = self.client.GetDoc(self.testfile.resource_id.text)
     except:
       self.tearDown()
       raise
示例#4
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.client.GDClient()
     self.client.api_version = '2'
     conf.configure_client(self.client, 'VersionTwoClientContactsTest', 'cp')
   self.old_proxy = os.environ.get('https_proxy')
示例#5
0
 def setUp(self):
     self.client = None
     if conf.settings.RUN_LIVE_TESTS:
         self.client = gdata.client.GDClient()
         self.client.api_version = '2'
         conf.configure_client(self.client, conf.settings.ContactsConfig,
                               'VersionTwoClientContactsTest')
示例#6
0
 def setUp(self):
   self.client = None
   if conf.settings.RUN_LIVE_TESTS:
     self.client = gdata.client.GDClient()
     self.client.api_version = '2'
     conf.configure_client(self.client, conf.settings.ContactsConfig,
                           'VersionTwoClientContactsTest')
示例#7
0
 def setUp(self):
     self.client = None
     if conf.options.get_value('runlive') == 'true':
         self.client = gdata.docs.client.DocsClient()
         if conf.options.get_value('ssl') == 'true':
             self.client.ssl = True
         conf.configure_client(self.client, 'DocsTest',
                               self.client.auth_service)
示例#8
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.youtube.client.YouTubeClient()
     
     conf.configure_client(self.client,
         'YouTubeTest',
         'youtube')
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.youtube.client.YouTubeClient()
     
     conf.configure_client(self.client,
         'YouTubeTest',
         'youtube')
    def setUp(self):
        """Creates an AnalyticsClient object."""

        self.client = None
        if conf.options.get_value("runlive") == "true":
            self.client = gdata.analytics.client.AnalyticsClient()
            self.client.http_client.debug = True

            conf.configure_client(self.client, "AnalyticsClientTest", self.client.auth_service)
  def setUp(self):
    self.client = None
    if conf.options.get_value('runlive') == 'true':
      self.client = gdata.projecthosting.client.ProjectHostingClient()
      conf.configure_client(self.client, 'ProjectHostingClientTest', 'code')

    self.project_name = conf.options.get_value('project_name')
    self.assignee = conf.options.get_value('issue_assignee')
    self.owner = conf.options.get_value('username')
示例#12
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.calendar_resource.client.CalendarResourceClient(
         domain=conf.options.get_value('appsdomain'))
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client, 'CalendarResourceClientTest',
         self.client.auth_service, True)
 def setUp(self):
     self.client = None
     if conf.options.get_value("runlive") == "true":
         self.client = gdata.sites.client.SitesClient(
             site=conf.options.get_value("sitename"), domain=conf.options.get_value("appsdomain")
         )
         if conf.options.get_value("ssl") == "true":
             self.client.ssl = True
         conf.configure_client(self.client, "SitesTest", self.client.auth_service, True)
示例#14
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.sites.client.SitesClient(
         site=conf.options.get_value('sitename'),
         domain=conf.options.get_value('sitedomain'))
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client, 'SitesTest', self.client.auth_service)
示例#15
0
 def setUp(self):
     self.client = gdata.apps.client.AppsClient(domain='example.com')
     if conf.options.get_value('runlive') == 'true':
         self.client = gdata.apps.client.AppsClient(
             domain=conf.options.get_value('appsdomain'))
         if conf.options.get_value('ssl') == 'true':
             self.client.ssl = True
         conf.configure_client(self.client, 'AppsClientTest',
                               self.client.auth_service, True)
    def setUp(self):
        self.client = None
        if conf.options.get_value("runlive") == "true":
            self.client = gdata.projecthosting.client.ProjectHostingClient()
            conf.configure_client(self.client, "ProjectHostingClientTest", "code")

        self.project_name = conf.options.get_value("project_name")
        self.assignee = conf.options.get_value("issue_assignee")
        self.owner = conf.options.get_value("username")
示例#17
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.docs.client.DocsClient(source='ResumableUploadTest')
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     self.f = open(conf.options.get_value('file'))
     self.content_type = conf.options.get_value('contenttype')
     conf.configure_client(
         self.client, 'ResumableUploadTest', self.client.auth_service)
示例#18
0
 def setUp(self):
   self.client = gdata.marketplace.client.LicensingClient(domain='example.com')
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.marketplace.client.LicensingClient(domain=conf.options.get_value('appsdomain'))
     conf.configure_client(self.client, 'LicensingClientTest', self.client.auth_service, True)
     self.client.auth_token = gdata.gauth.TwoLeggedOAuthHmacToken(conf.options.get_value('appsconsumerkey'), conf.options.get_value('appsconsumersecret'), '')
     self.client.source = 'GData-Python-Client-Test'
     self.client.account_type='HOSTED'
     self.client.http_client.debug = True
     self.app_id = conf.options.get_value('appsid')
示例#19
0
    def setUp(self):
        """Creates an AnalyticsClient object."""

        self.client = None
        if conf.options.get_value('runlive') == 'true':
            self.client = gdata.analytics.client.AnalyticsClient()
            self.client.http_client.debug = True

            conf.configure_client(self.client, 'AnalyticsClientTest',
                                  self.client.auth_service)
 def setUp(self):
   self.client = gdata.marketplace.client.LicensingClient(domain='example.com')
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.marketplace.client.LicensingClient(domain=conf.options.get_value('appsdomain'))
     conf.configure_client(self.client, 'LicensingClientTest', self.client.auth_service, True)
     self.client.auth_token = gdata.gauth.TwoLeggedOAuthHmacToken(conf.options.get_value('appsconsumerkey'), conf.options.get_value('appsconsumersecret'), '')
     self.client.source = 'GData-Python-Client-Test'
     self.client.account_type='HOSTED'
     self.client.http_client.debug = True
     self.app_id = conf.options.get_value('appsid')
示例#21
0
 def setUp(self):
   self.client = gdata.contacts.client.ContactsClient(domain='example.com')
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.contacts.client.ContactsClient(
         domain=conf.options.get_value('appsdomain'))
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client, 'ProfileTest',
         self.client.auth_service, True)
     self.client.username = conf.options.get_value('appsusername').split('@')[0]
示例#22
0
 def setUp(self):
   self.client = gdata.apps.multidomain.client.MultiDomainProvisioningClient(
       domain='example.com')
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.apps.multidomain.client.MultiDomainProvisioningClient(
         domain=conf.options.get_value('appsdomain'))
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client, 'MultidomainProvisioningClientTest',
         self.client.auth_service, True)
示例#23
0
 def setUp(self):
     self.client = gdata.contacts.client.ContactsClient(domain='example.com')
     if conf.options.get_value('runlive') == 'true':
         self.client = gdata.contacts.client.ContactsClient(
             domain=conf.options.get_value('appsdomain'))
         if conf.options.get_value('ssl') == 'true':
             self.client.ssl = True
         conf.configure_client(self.client, 'ProfileTest',
                               self.client.auth_service, True)
         self.client.username = conf.options.get_value('appsusername').split('@')[0]
    def setUp(self):
        self.client = None
        if conf.options.get_value('runlive') == 'true':
            self.client = gdata.projecthosting.client.ProjectHostingClient()
            conf.configure_client(self.client, 'ProjectHostingClientTest',
                                  'code')

        self.project_name = conf.options.get_value('project_name')
        self.assignee = conf.options.get_value('issue_assignee')
        self.owner = conf.options.get_value('username')
示例#25
0
 def setUp(self):
     self.client = None
     if conf.options.get_value('runlive') == 'true':
         self.client = gdata.sites.client.SitesClient(
             site=conf.options.get_value('sitename'),
             domain=conf.options.get_value('appsdomain'))
         if conf.options.get_value('ssl') == 'true':
             self.client.ssl = True
         conf.configure_client(self.client, 'SitesTest',
                               self.client.auth_service, True)
 def setUp(self):
     if conf.options.get_value("runlive") != "true":
         raise RuntimeError("Live tests require --runlive true")
     else:
         self.client = gdata.docs.client.DocsClient()
         if conf.options.get_value("ssl") == "true":
             self.client.ssl = True
         conf.configure_client(self.client, "DocsTest", self.client.auth_service)
         conf.configure_cache(self.client, str(self.__class__))
         if conf.options.get_value("clean") == "true":
             self._delete_all()
示例#27
0
 def setUp(self):
   self.client = gdata.apps.emailsettings.client.EmailSettingsClient(
       domain='example.com')
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.apps.emailsettings.client.EmailSettingsClient(
         domain=conf.options.get_value('appsdomain'))
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client, 'EmailSettingsClientTest',
         self.client.auth_service, True)
     self.username = conf.options.get_value('appsusername').split('@')[0]
示例#28
0
 def setUp(self):
   if conf.options.get_value('runlive') != 'true':
     raise RuntimeError('Live tests require --runlive true')
   else:
     self.client = gdata.docs.client.DocsClient()
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client, 'DocsTest', self.client.auth_service)
     conf.configure_cache(self.client, str(self.__class__))
     if conf.options.get_value('clean') == 'true':
       self._delete_all()
 def setUp(self):
   self.client = gdata.apps.organization.client.OrganizationUnitProvisioningClient(
       domain='example.com')
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.apps.organization.client.OrganizationUnitProvisioningClient(
         domain=conf.options.get_value('appsdomain'))
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client,
                           'OrganizationUnitProvisioningClientTest',
                           self.client.auth_service, True)
示例#30
0
 def setUp(self):
     self.client = None
     if conf.options.get_value('runlive') == 'true':
         self.client = gdata.docs.client.DocsClient(
             source='ResumableUploadTest')
         if conf.options.get_value('ssl') == 'true':
             self.client.ssl = True
         self.f = open(conf.options.get_value('file'))
         self.content_type = conf.options.get_value('contenttype')
         conf.configure_client(self.client, 'ResumableUploadTest',
                               self.client.auth_service)
示例#31
0
 def setUp(self):
   if conf.options.get_value('runlive') != 'true':
     raise RuntimeError('Live tests require --runlive true')
   else:
     self.client = gdata.docs.client.DocsClient()
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client, 'DocsTest', self.client.auth_service)
     conf.configure_cache(self.client, str(self.__class__))
     if conf.options.get_value('clean') == 'true':
       self._delete_all()
示例#32
0
 def setUp(self):
   self.client = gdata.apps.emailsettings.client.EmailSettingsClient(
       domain='example.com')
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.apps.emailsettings.client.EmailSettingsClient(
         domain=conf.options.get_value('appsdomain'))
     if conf.options.get_value('ssl') == 'true':
       self.client.ssl = True
     conf.configure_client(self.client, 'EmailSettingsClientTest',
         self.client.auth_service, True)
     self.username = conf.options.get_value('appsusername').split('@')[0]
示例#33
0
  def setUp(self):
    if conf.options.get_value('runlive') != 'true':
      raise RuntimeError('Live tests require --runlive true')

    self.client = gdata.docs.client.DocsClient()
    if conf.options.get_value('ssl') == 'false':
      self.client.ssl = False
    conf.configure_client(self.client, 'DocsTest', self.client.auth_service)
    conf.configure_cache(self.client, str(self.__class__))
    if conf.options.get_value('clean') == 'true':
      self._delete_all()

    tries = 0
    while tries < 3:
      try:
        tries += 1
        self._create()
        break
      except gdata.client.RequestError:
        if tries >= 2:
          self.tearDown()
          raise
    def setUp(self):
        if conf.options.get_value("runlive") != "true":
            raise RuntimeError("Live tests require --runlive true")

        self.client = gdata.docs.client.DocsClient()
        if conf.options.get_value("ssl") == "false":
            self.client.ssl = False
        conf.configure_client(self.client, "DocsTest", self.client.auth_service)
        conf.configure_cache(self.client, str(self.__class__))
        if conf.options.get_value("clean") == "true":
            self._delete_all()

        tries = 0
        while tries < 3:
            try:
                tries += 1
                self._create()
                break
            except gdata.client.RequestError:
                if tries >= 2:
                    self.tearDown()
                    raise
示例#35
0
  def setUp(self):
    if conf.options.get_value('runlive') != 'true':
      raise RuntimeError('Live tests require --runlive true')

    self.client = gdata.docs.client.DocsClient()
    if conf.options.get_value('ssl') == 'false':
      self.client.ssl = False
    conf.configure_client(self.client, 'DocsTest', self.client.auth_service)
    conf.configure_cache(self.client, str(self.__class__))
    if conf.options.get_value('clean') == 'true':
      self._delete_all()

    tries = 0
    while tries < 3:
      try:
        tries += 1
        self._create()
        break
      except gdata.client.RequestError:
        if tries >= 2:
          self.tearDown()
          raise
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.maps.client.MapsClient()
     conf.configure_client(self.client, 'MapsTest', 'local')
示例#37
0
 def setUp(self):
     self.client = None
     if conf.settings.RUN_LIVE_TESTS:
         self.client = gdata.blogger.client.BloggerClient()
         conf.configure_client(self.client, conf.settings.BloggerConfig,
                               'BloggerTest')
示例#38
0
 def setUp(self):
   self.client = None
   if conf.settings.RUN_LIVE_TESTS:
     self.client = gdata.client.GDClient()
     conf.configure_client(self.client, conf.settings.ContactsConfig,
         'ContactsTest')
示例#39
0
 def setUp(self):
   self.client = None
   if conf.settings.RUN_LIVE_TESTS:
     self.client = gdata.client.GDClient()
     conf.configure_client(self.client, conf.settings.BloggerConfig, 
         'BloggerTest')
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.blogger.client.BloggerClient()
     conf.configure_client(self.client, 'BloggerTest', 'blogger')
示例#41
0
 def setUp(self):
     self.client = None
     if conf.settings.RUN_LIVE_TESTS:
         self.client = gdata.client.GDClient()
         conf.configure_client(self.client, conf.settings.ContactsConfig,
                               'ContactsTest')
示例#42
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.client.GDClient()
     conf.configure_client(self.client, 'ContactsTest', 'cp')
 def setUp(self):
     self.client = None
     if conf.options.get_value('runlive') == 'true':
         self.client = gdata.contacts.client.ContactsClient()
         conf.configure_client(self.client, 'ContactsTest', 'cp')
示例#44
0
 def setUp(self):
     self.client = None
     if conf.options.get_value('runlive') == 'true':
         self.client = gdata.spreadsheets.client.SpreadsheetsClient()
         conf.configure_client(self.client, 'SpreadsheetsClientTest',
                               'wise')
示例#45
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.spreadsheets.client.SpreadsheetsClient()
     conf.configure_client(self.client, 'SpreadsheetsClientTest', 'wise')
示例#46
0
 def setUp(self):
   self.client = None
   if conf.options.get_value('runlive') == 'true':
     self.client = gdata.client.GDClient()
     conf.configure_client(self.client, 'BloggerTest', 'blogger')
示例#47
0
 def setUp(self):
     self.client = None
     if conf.options.get_value('runlive') == 'true':
         self.client = gdata.maps.client.MapsClient()
         conf.configure_client(self.client, 'MapsTest', 'local')