@timed(2)
    def test_watchdog_send_logs(self):

        m = Main()
        watchdogsock = m.get_watchdogsocket()
        m.tcp_connect()
        m.send_connect([('login', '4.test'), ('passcode', 'test')])
        m.get_frame()  # Connected frame

        msg = str(uuid.uuid4())

        # Empty logs
        watchdogsock.settimeout(0.1)
        try:
            while watchdogsock.recvfrom(4096):
                pass
        except socket.timeout:
            pass

        m.send_frame('SEND', [('destination', config.TEST_WATCHDOG_TOPIC[0][0])], msg)

        # Check if we got logs (maximum for 3 seconds)
        start = time.time()

        watchdogsock.settimeout(1)

        while time.time() < (start + 3):
            frame, _ = watchdogsock.recvfrom(4096)
            if frame != '':
                jframe = json.loads(frame)

                if jframe['type'] == 'log':
                    if jframe['topic'] == config.TEST_WATCHDOG_TOPIC[0][0] and jframe['message'] == msg:
                        watchdogsock.close()
                        return
        watchdogsock.close()
        raise Exception("No logs")
Test if the watchdog send logs
dataset/ETHPy150Open ebu/radiodns-plugit/RadioVisServer/tests.py/MainTests.test_watchdog_send_logs