Files
deb-python-cassandra-driver/cqlengine/tests/base.py
2012-11-18 17:34:35 -08:00

12 lines
384 B
Python

from unittest import TestCase
class BaseCassEngTestCase(TestCase):
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))