def send_keys(): items = queue.read_list() if len(items) > 0: send_key = items[0] try: send(1, send_key) except Exception, ex: send(1, "Invalid key. %s" % ex) queue.remove_key(send_key)
def test(self): row = "0c:f3:ee:00:f6:33,8deefbb9f7384297804096668bb44281,5000,3221,-63,-78" queue.queue_beacon(row) # # check the key exists # buffer = queue.read_list() key = "8deefbb9f7384297804096668bb44281_5000_3221" new_assert = queue.key_exists(key, buffer) self.assertEqual(new_assert, True) # # Act # queue.remove_key(key) # # Assert # buffer2 = queue.read_list() new_assert2 = queue.key_exists(key, buffer2) self.assertEqual(new_assert2, False)