Don't try to sync table with static if test will be skipped
This commit is contained in:
@@ -22,6 +22,9 @@ from cassandra.cqlengine.models import Model
|
|||||||
from tests.integration.cqlengine.base import BaseCassEngTestCase
|
from tests.integration.cqlengine.base import BaseCassEngTestCase
|
||||||
from tests.integration import PROTOCOL_VERSION
|
from tests.integration import PROTOCOL_VERSION
|
||||||
|
|
||||||
|
# TODO: is this really a protocol limitation, or is it just C* version?
|
||||||
|
# good enough proxy for now
|
||||||
|
STATIC_SUPPORTED = PROTOCOL_VERSION >= 2
|
||||||
|
|
||||||
class TestStaticModel(Model):
|
class TestStaticModel(Model):
|
||||||
partition = columns.UUID(primary_key=True, default=uuid4)
|
partition = columns.UUID(primary_key=True, default=uuid4)
|
||||||
@@ -30,13 +33,14 @@ class TestStaticModel(Model):
|
|||||||
text = columns.Text()
|
text = columns.Text()
|
||||||
|
|
||||||
|
|
||||||
@skipUnless(PROTOCOL_VERSION >= 2, "only runs against the cql3 protocol v2.0")
|
@skipUnless(STATIC_SUPPORTED, "only runs against the cql3 protocol v2.0")
|
||||||
class TestStaticColumn(BaseCassEngTestCase):
|
class TestStaticColumn(BaseCassEngTestCase):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super(TestStaticColumn, cls).setUpClass()
|
super(TestStaticColumn, cls).setUpClass()
|
||||||
drop_table(TestStaticModel)
|
drop_table(TestStaticModel)
|
||||||
|
if STATIC_SUPPORTED: # setup and teardown run regardless of skip
|
||||||
sync_table(TestStaticModel)
|
sync_table(TestStaticModel)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user