def test_behaviors_expire(self):
     obj1 = behaviors.Behaviors(self.test_items1, self.test_descriptions, self.test_user)
     obj2 = behaviors.Behaviors(self.test_items2, self.test_descriptions, self.test_user)
     source_value1 = list(obj1._callbacks.keys())
     # source_value2 = list(obj1._callbacks.keys())
     obj1.expire()
     obj2.expire()
     self.assertTrue(list(obj1._callbacks.keys()) == source_value1)
     self.assertTrue(list(obj2._callbacks.keys()) == [])
 def test_behaviors_init(self):
     obj = behaviors.Behaviors(self.test_items1, self.test_descriptions,
                               self.test_user)
     obj.initialize()
     self.assertTrue(hasattr(obj, 'timeout'))
     self.assertTrue(hasattr(obj, '_delete'))
     self.assertTrue(list(obj._callbacks.keys()) == ['123-ASDF'])
 def test_behaviors_has_callback(self):
     obj1 = behaviors.Behaviors(self.test_items1, self.test_descriptions,
                                self.test_user)
     obj1.initialize()
     self.assertTrue(obj1.has_callback('123-ASDF'))