test: add _should_test_gdrive and _get_gdrive_url inside GDrive

This commit is contained in:
Saugat Pachhai
2020-01-04 22:03:49 +05:45
parent 85c35f894c
commit c0616fcee2
2 changed files with 15 additions and 17 deletions
+5 -6
View File
@@ -34,10 +34,10 @@ from tests.remotes import (
_should_test_aws,
_should_test_azure,
_should_test_gcp,
_should_test_gdrive,
_should_test_hdfs,
_should_test_oss,
_should_test_ssh,
GDrive,
TEST_CONFIG,
TEST_SECTION,
TEST_GCP_CREDS_FILE,
@@ -47,7 +47,6 @@ from tests.remotes import (
get_aws_url,
get_azure_url,
get_gcp_url,
get_gdrive_url,
get_hdfs_url,
get_local_url,
get_oss_url,
@@ -209,7 +208,7 @@ class TestRemoteS3(TestDataCloudBase):
class TestRemoteGDrive(TestDataCloudBase):
def _should_test(self):
return _should_test_gdrive()
return GDrive.should_test()
def _setup_cloud(self):
self._ensure_should_run()
@@ -230,7 +229,7 @@ class TestRemoteGDrive(TestDataCloudBase):
self.assertIsInstance(self.cloud.get_remote(), self._get_cloud_class())
def _get_url(self):
return get_gdrive_url()
return GDrive.get_url()
def _get_cloud_class(self):
return RemoteGDrive
@@ -484,10 +483,10 @@ class TestRemoteS3CLI(TestDataCloudCLIBase):
class TestRemoteGDriveCLI(TestDataCloudCLIBase):
def _should_test(self):
return _should_test_gdrive()
return GDrive.should_test()
def _test(self):
url = get_gdrive_url()
url = GDrive.get_url()
self.main(["remote", "add", TEST_REMOTE, url])
self.main(