diff --git a/tests/integration/standard/test_client_warnings.py b/tests/integration/standard/test_client_warnings.py index b3298872..173cc697 100644 --- a/tests/integration/standard/test_client_warnings.py +++ b/tests/integration/standard/test_client_warnings.py @@ -33,9 +33,8 @@ class ClientWarningTests(unittest.TestCase): @classmethod def setUpClass(cls): if PROTOCOL_VERSION < 4: - raise unittest.SkipTest( - "Native protocol 4,0+ is required for client warnings, currently using %r" - % (PROTOCOL_VERSION,)) + return + cls.cluster = Cluster(protocol_version=PROTOCOL_VERSION) cls.session = cls.cluster.connect() @@ -51,8 +50,17 @@ class ClientWarningTests(unittest.TestCase): @classmethod def tearDownClass(cls): + if PROTOCOL_VERSION < 4: + return + cls.cluster.shutdown() + def setUp(self): + if PROTOCOL_VERSION < 4: + raise unittest.SkipTest( + "Native protocol 4,0+ is required for client warnings, currently using %r" + % (PROTOCOL_VERSION,)) + def test_warning_basic(self): """ Test to validate that client warnings can be surfaced diff --git a/tests/integration/standard/test_custom_payload.py b/tests/integration/standard/test_custom_payload.py index c253d64b..87b38fac 100644 --- a/tests/integration/standard/test_custom_payload.py +++ b/tests/integration/standard/test_custom_payload.py @@ -28,14 +28,11 @@ def setup_module(): class CustomPayloadTests(unittest.TestCase): - @classmethod - def setUpClass(cls): + def setUp(self): if PROTOCOL_VERSION < 4: raise unittest.SkipTest( "Native protocol 4,0+ is required for custom payloads, currently using %r" % (PROTOCOL_VERSION,)) - - def setUp(self): self.cluster = Cluster(protocol_version=PROTOCOL_VERSION) self.session = self.cluster.connect()