Example #1
0
def mocks(request, monkeypatch):
    from tests import tkinter_mock
    from tests import uiautomator_mock
    from tests import screenrecord_mock

    class Mocks(object): pass

    m = Mocks()
    m.uiroot = tkinter_mock.install(monkeypatch)
    m.screenrecord = screenrecord_mock.install(monkeypatch)
    m.device, m.dummy_img = uiautomator_mock.install(monkeypatch)
    return m
Example #2
0
def mocks(request, monkeypatch):
    from tests import tkinter_mock
    from tests import uiautomator_mock
    from tests import screenrecord_mock

    class Mocks(object): pass

    m = Mocks()
    m.uiroot = tkinter_mock.install(monkeypatch)
    m.screenrecord = screenrecord_mock.install(monkeypatch)

    if not request.config.getoption('--use_real_device'):
        m.device, m.dummy_img = uiautomator_mock.install(monkeypatch)
    return m
Example #3
0
def mocks(request, monkeypatch):
    from tests import tkinter_mock
    from tests import uiautomator_mock
    from tests import screenrecord_mock

    class Mocks(object):
        pass

    m = Mocks()
    m.uiroot = tkinter_mock.install(monkeypatch)
    m.screenrecord = screenrecord_mock.install(monkeypatch)

    if not request.config.getoption('--use_real_device'):
        m.device, m.dummy_img = uiautomator_mock.install(monkeypatch)
    return m