def test_get_nothide(self): queue = StorageQueueContext(**testconfig) queue.register_model(QueueOne()) message = QueueOne(epgid=1, resolution='test_get_nothide') queue.put(message) getmessage = queue.get(QueueOne(), hide=1) assert getmessage.epgid == 1 and getmessage.resolution == 'test_get_nothide' time.sleep(1) testmessage = queue.get(QueueOne()) assert testmessage.epgid == 1 and getmessage.resolution == 'test_get_nothide' queue.delete(testmessage)
def test_get_nothide_encrypted(self): queue = StorageQueueContext(**testconfig) message = QueueTwo() queue.register_model(message) message.server = 'encrypted server' message.protocol = 'sftp' message.user = '******' message.password = '******' queue.put(message) message = queue.get(QueueTwo(), hide=1) assert (message.server == 'encrypted server' and message.protocol == 'sftp' and message.user == 'user' and message.password == 'secret') time.sleep(1) testmessage = queue.get(QueueTwo()) queue.delete(testmessage)