From 8bdbc6607520258ac25936cd1499d9ed953e51a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0urda?= Date: Thu, 21 Jul 2022 15:22:18 +0800 Subject: [PATCH] Mock network backend - also enable netowork tests --- .buildbot/kivy/Dockerfile | 3 ++- src/bitmessagekivy/tests/test_network_screen.py | 2 -- src/mock/kivy_main.py | 1 + src/mock/network.py | 8 ++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/mock/network.py diff --git a/.buildbot/kivy/Dockerfile b/.buildbot/kivy/Dockerfile index 58c2be08..70c84223 100644 --- a/.buildbot/kivy/Dockerfile +++ b/.buildbot/kivy/Dockerfile @@ -3,13 +3,14 @@ FROM ubuntu:bionic AS kivy ENV DEBIAN_FRONTEND=noninteractive -ENV SKIPCACHE=2022-07-20 +ENV SKIPCACHE=2022-07-21 RUN apt-get update RUN apt-get install -yq \ build-essential libcap-dev libssl-dev \ libmtdev-dev libpq-dev \ + libxrender1 \ python3-dev python3-pip python3-virtualenv \ xvfb diff --git a/src/bitmessagekivy/tests/test_network_screen.py b/src/bitmessagekivy/tests/test_network_screen.py index 6e073be0..10de69a1 100644 --- a/src/bitmessagekivy/tests/test_network_screen.py +++ b/src/bitmessagekivy/tests/test_network_screen.py @@ -1,13 +1,11 @@ # pylint: disable=too-few-public-methods from .telenium_process import TeleniumTestProcess -from .common import skip_screen_checks class NetworkStatusScreen(TeleniumTestProcess): """NetworkStatus Screen Functionality Testing""" - @skip_screen_checks def test_network_status(self): """Show NetworkStatus""" # This is for checking Current screen diff --git a/src/mock/kivy_main.py b/src/mock/kivy_main.py index badc1dc1..7c9f2116 100644 --- a/src/mock/kivy_main.py +++ b/src/mock/kivy_main.py @@ -3,6 +3,7 @@ from pybitmessage import state from pybitmessage.bitmessagekivy.mpybit import NavigateApp from class_addressGenerator import FakeAddressGenerator +import network def main(): diff --git a/src/mock/network.py b/src/mock/network.py new file mode 100644 index 00000000..7091fefc --- /dev/null +++ b/src/mock/network.py @@ -0,0 +1,8 @@ +class objectracker(object): + missingObjects = () + + +class stats(object): + @staticmethod + def connectedHostsList(): + return ()