Пример #1
0
  def setup_class(cls):
    setup_credentials()

    create_file(cls.first_file, cls.first_file)
    create_file(cls.second_file, cls.second_file)

    cls.ga = GoogleAuth('pydrive2/test/settings/default.yaml')
    cls.ga.ServiceAuth()
Пример #2
0
    def setup_class(cls):
        setup_credentials()

        create_file(cls.first_file, cls.first_file)
        create_file(cls.second_file, cls.second_file)

        cls.ga = GoogleAuth(settings_file_path("default.yaml"))
        cls.ga.ServiceAuth()
Пример #3
0
    def setup_class(cls):
        setup_credentials()

        cls.tmpdir = mkdtemp()

        cls.ga = GoogleAuth(
            settings_file_path("default.yaml", os.path.join(cls.tmpdir, "")))
        cls.ga.ServiceAuth()
Пример #4
0
def fs(tmpdir, base_remote_dir):
    setup_credentials()
    auth = GoogleAuth(settings_file_path("default.yaml", tmpdir / ""))
    auth.ServiceAuth()

    bucket, base = base_remote_dir.split("/", 1)
    fs = GDriveFileSystem(base_remote_dir, auth)
    fs._gdrive_create_dir("root", base)

    return fs
Пример #5
0
 def test_06_ServiceAuthFromSavedCredentialsFile(self):
   setup_credentials("credentials/6.dat")
   ga = GoogleAuth('pydrive2/test/settings/test_oauth_test_06.yaml')
   ga.ServiceAuth()
   self.assertEqual(ga.access_token_expired, False)
   time.sleep(1)
Пример #6
0
 def test_06_ServiceAuthFromSavedCredentialsP12File(self):
     setup_credentials("credentials/6.dat")
     ga = GoogleAuth(settings_file_path("test_oauth_test_06.yaml"))
     ga.ServiceAuth()
     self.assertEqual(ga.access_token_expired, False)
     time.sleep(1)
Пример #7
0
 def setup_class(cls):
     setup_credentials()
Пример #8
0
    def setup_class(cls):
        setup_credentials()

        cls.ga = GoogleAuth('pydrive2/test/settings/default.yaml')
        cls.ga.ServiceAuth()
        cls.drive = GoogleDrive(cls.ga)
Пример #9
0
    def setup_class(cls):
        setup_credentials()

        cls.ga = GoogleAuth(settings_file_path("default.yaml"))
        cls.ga.ServiceAuth()
        cls.drive = GoogleDrive(cls.ga)