Files
deb-python-cassandra-driver/tests/integration/cqlengine/base.py
Adam Holmberg 4698509727 Reloate cqlengine tests to integration tests, update imports
Not integrated with existing integration ccm operation.
There is a handful of failing cqlengine tests in the commit, that worked
before the move.
2015-02-04 11:56:19 -06:00

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)