Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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
Beispiel #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)
Beispiel #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)
Beispiel #7
0
 def setup_class(cls):
     setup_credentials()
Beispiel #8
0
    def setup_class(cls):
        setup_credentials()

        cls.ga = GoogleAuth('pydrive2/test/settings/default.yaml')
        cls.ga.ServiceAuth()
        cls.drive = GoogleDrive(cls.ga)
    def setup_class(cls):
        setup_credentials()

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