From 3aa6492016a1aa86682faabfc81170ba2dfcac89 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Mon, 18 Oct 2021 15:50:54 +0200 Subject: [PATCH] dist/pythonlibs/riotctrl_shell/tests/common: add expect to mock --- dist/pythonlibs/riotctrl_shell/tests/common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/pythonlibs/riotctrl_shell/tests/common.py b/dist/pythonlibs/riotctrl_shell/tests/common.py index 342fb1be74..b7d6d6b689 100644 --- a/dist/pythonlibs/riotctrl_shell/tests/common.py +++ b/dist/pythonlibs/riotctrl_shell/tests/common.py @@ -14,6 +14,7 @@ class MockSpawn(): # set some expected attributes self.before = None self.echo = False + self.expect_res = 0 @property def last_command(self): @@ -42,6 +43,9 @@ class MockSpawn(): # always match on prompt with replwrap return 0 + def expect(self, *args, **kwargs): + return self.expect_res + class MockRIOTCtrl(): """