def test_drive(self, dvc): remote = RemoteGDrive(dvc, self.CONFIG) os.environ[RemoteGDrive. GDRIVE_CREDENTIALS_DATA] = USER_CREDS_TOKEN_REFRESH_ERROR with pytest.raises(GDriveAccessTokenRefreshError): remote._drive os.environ[RemoteGDrive.GDRIVE_CREDENTIALS_DATA] = "" remote = RemoteGDrive(dvc, self.CONFIG) os.environ[ RemoteGDrive.GDRIVE_CREDENTIALS_DATA] = USER_CREDS_MISSED_KEY_ERROR with pytest.raises(GDriveMissedCredentialKeyError): remote._drive
def test_init_drive(repo): url = "gdrive://root/data" gdrive = RemoteGDrive(repo, {"url": url}) assert str(gdrive.path_info) == url
def test_init(self): remote = RemoteGDrive(Repo(), self.CONFIG) assert str(remote.path_info) == self.CONFIG["url"]
def test_init(self, dvc): remote = RemoteGDrive(dvc, self.CONFIG) assert str(remote.path_info) == self.CONFIG["url"]
def gdrive(repo): ret = RemoteGDrive(repo, {"url": "gdrive://root/data"}) return ret
def test_init_folder_id(repo): url = "gdrive://folder_id/data" gdrive = RemoteGDrive(repo, {"url": url}) assert str(gdrive.path_info) == url