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()
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()
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()
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
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)
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)
def setup_class(cls): setup_credentials()
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)