Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
arithmetic1728 committed Jan 29, 2021
1 parent b06afdb commit 2bf1118
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions tests/system/test_system.py
Expand Up @@ -108,11 +108,12 @@ def tearDownModule():
class TestClient(unittest.TestCase):
@classmethod
def setUpClass(cls):
super(TestClient, cls).setUpClass()
if (
type(Config.CLIENT._credentials)
is not google.oauth2.service_account.Credentials
):
cls.skipTest("These tests require a service account credential")
cls.skipTest(cls, reason="These tests require a service account credential")

def setUp(self):
self.case_hmac_keys_to_delete = []
Expand Down Expand Up @@ -578,11 +579,12 @@ class TestStorageWriteFiles(TestStorageFiles):

@classmethod
def setUpClass(cls):
super(TestStorageWriteFiles, cls).setUpClass()
if (
type(Config.CLIENT._credentials)
is not google.oauth2.service_account.Credentials
):
cls.skipTest("These tests require a service account credential")
cls.skipTest(cls, reason="These tests require a service account credential")

def test_large_file_write_from_stream(self):
blob = self.bucket.blob("LargeFile")
Expand Down Expand Up @@ -1293,11 +1295,14 @@ class TestStorageSignURLs(unittest.TestCase):

@classmethod
def setUpClass(cls):
super(TestStorageSignURLs, cls).setUpClass()
if (
type(Config.CLIENT._credentials)
is not google.oauth2.service_account.Credentials
):
cls.skipTest("Signing tests requires a service account credential")
cls.skipTest(
cls, reason="Signing tests requires a service account credential"
)

bucket_name = "gcp-signing" + unique_resource_id()
cls.bucket = retry_429_503(Config.CLIENT.create_bucket)(bucket_name)
Expand Down Expand Up @@ -1860,8 +1865,9 @@ class TestStorageNotificationCRUD(unittest.TestCase):

@classmethod
def setUpClass(cls):
super(TestStorageNotificationCRUD, cls).setUpClass()
if Config.TESTING_MTLS:
cls.skipTest("Skip pubsub tests for mTLS testing")
cls.skipTest(cls, reason="Skip pubsub tests for mTLS testing")

@property
def topic_path(self):
Expand Down Expand Up @@ -2025,9 +2031,10 @@ def _kms_key_name(self, key_name=None):

@classmethod
def setUpClass(cls):
if Config.TESTING_MTLS:
cls.skipTest("Skip kms tests for mTLS testing")
super(TestKMSIntegration, cls).setUpClass()
if Config.TESTING_MTLS:
cls.skipTest(cls, reason="Skip kms tests for mTLS testing")

_empty_bucket(Config.CLIENT, cls.bucket)

def setUp(self):
Expand Down Expand Up @@ -2483,11 +2490,12 @@ def test_ubla_set_unset_preserves_acls(self):
class TestV4POSTPolicies(unittest.TestCase):
@classmethod
def setUpClass(cls):
super(TestV4POSTPolicies, cls).setUpClass()
if (
type(Config.CLIENT._credentials)
is not google.oauth2.service_account.Credentials
):
cls.skipTest("These tests require a service account credential")
cls.skipTest(cls, reason="These tests require a service account credential")

def setUp(self):
self.case_buckets_to_delete = []
Expand Down

0 comments on commit 2bf1118

Please sign in to comment.