def test_attr(self): self.obj2.db.testattr = 45 self.assertEquals(True, lockfuncs.attr(self.obj2, None, 'testattr', '45')) self.assertEquals(False, lockfuncs.attr_gt(self.obj2, None, 'testattr', '45')) self.assertEquals(True, lockfuncs.attr_ge(self.obj2, None, 'testattr', '45')) self.assertEquals(False, lockfuncs.attr_lt(self.obj2, None, 'testattr', '45')) self.assertEquals(True, lockfuncs.attr_le(self.obj2, None, 'testattr', '45')) self.assertEquals(True, lockfuncs.objattr(None, self.obj2, 'testattr', '45')) self.assertEquals(True, lockfuncs.objattr(None, self.obj2, 'testattr', '45')) self.assertEquals(False, lockfuncs.objattr(None, self.obj2, 'testattr', '45', compare='lt'))
def test_attr(self): self.obj2.db.testattr = 45 self.assertEqual(True, lockfuncs.attr(self.obj2, None, "testattr", "45")) self.assertEqual(False, lockfuncs.attr_gt(self.obj2, None, "testattr", "45")) self.assertEqual(True, lockfuncs.attr_ge(self.obj2, None, "testattr", "45")) self.assertEqual(False, lockfuncs.attr_lt(self.obj2, None, "testattr", "45")) self.assertEqual(True, lockfuncs.attr_le(self.obj2, None, "testattr", "45")) self.assertEqual(True, lockfuncs.objattr(None, self.obj2, "testattr", "45")) self.assertEqual(True, lockfuncs.objattr(None, self.obj2, "testattr", "45")) self.assertEqual(False, lockfuncs.objattr(None, self.obj2, "testattr", "45", compare="lt"))
def test_attr(self): self.obj2.db.testattr = 45 self.assertEqual(True, lockfuncs.attr(self.obj2, None, 'testattr', '45')) self.assertEqual(False, lockfuncs.attr_gt(self.obj2, None, 'testattr', '45')) self.assertEqual(True, lockfuncs.attr_ge(self.obj2, None, 'testattr', '45')) self.assertEqual(False, lockfuncs.attr_lt(self.obj2, None, 'testattr', '45')) self.assertEqual(True, lockfuncs.attr_le(self.obj2, None, 'testattr', '45')) self.assertEqual(True, lockfuncs.objattr(None, self.obj2, 'testattr', '45')) self.assertEqual(True, lockfuncs.objattr(None, self.obj2, 'testattr', '45')) self.assertEqual( False, lockfuncs.objattr(None, self.obj2, 'testattr', '45', compare='lt'))