From ef47d7d6d3fa13d97f46ae92f54426a8a203cb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 29 Mar 2020 18:26:19 +0200 Subject: [PATCH] mock real behaviour --- communicator.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/communicator.py b/communicator.py index 93351a6..a8ad472 100644 --- a/communicator.py +++ b/communicator.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import random import requests from singleton import Singleton @@ -23,21 +24,21 @@ class Communicator(Singleton): :param message: :return: none """ - pass + return None def discoveravailableconsumers(self) -> list: """ Get the list of available consumer from the current primary consumer. :return: """ - pass + return ["10.69.42.1","10.42.69.1","10.10.10.10","10.6.66.1"] def isconsumeravailable(self) -> bool: """ Readiness probe primary consumer. :return: """ - pass + return bool(random.getrandbits(1)) def checkconsumer(self, consumer: str) -> bool: """ @@ -45,4 +46,4 @@ class Communicator(Singleton): :param consumer: :return: """ - pass + return bool(random.getrandbits(1))