Not integrated with existing integration ccm operation. There is a handful of failing cqlengine tests in the commit, that worked before the move.
26 lines
735 B
Python
26 lines
735 B
Python
import sys
|
|
from unittest import TestCase
|
|
|
|
from cassandra.cqlengine.connection import get_session
|
|
|
|
|
|
class BaseCassEngTestCase(TestCase):
|
|
|
|
session = None
|
|
|
|
def setUp(self):
|
|
self.session = get_session()
|
|
super(BaseCassEngTestCase, self).setUp()
|
|
|
|
def assertHasAttr(self, obj, attr):
|
|
self.assertTrue(hasattr(obj, attr),
|
|
"{} doesn't have attribute: {}".format(obj, attr))
|
|
|
|
def assertNotHasAttr(self, obj, attr):
|
|
self.assertFalse(hasattr(obj, attr),
|
|
"{} shouldn't have the attribute: {}".format(obj, attr))
|
|
|
|
if sys.version_info > (3, 0):
|
|
def assertItemsEqual(self, first, second, msg=None):
|
|
return self.assertCountEqual(first, second, msg)
|