mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 06:23:53 +01:00
dist/pythonlibs/riotctrl_shell/tests/common: add expect to mock
This commit is contained in:
parent
afde4b0e43
commit
3aa6492016
@ -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():
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user