def test_app_selector(mocker, apps): mocked_get = mocker.patch.object(Roku, '_get') mocked_get.return_value = serialize_apps(apps) for app in apps: roku = app.roku assert roku[app.id] == app assert roku[app.name] == app
def test_app_selector(mocker, apps): mocked_get = mocker.patch.object(Roku, "_get") mocked_get.return_value = serialize_apps(apps) for app in apps: roku = app.roku assert roku[app.id] == app assert roku[app.name] == app
def test_apps(mocker, roku): faux_apps = (Application('0x', '1.2.3', 'Fauxku Channel Store'), ) mocked_get = mocker.patch.object(Roku, '_get') mocked_get.return_value = serialize_apps(faux_apps) apps = roku.apps assert len(apps) == 1 assert apps[0].id == '0x' assert apps[0].version == '1.2.3' assert apps[0].name == 'Fauxku Channel Store'
def test_apps(mocker, roku): faux_apps = (Application("0x", "1.2.3", "Fauxku Channel Store"),) mocked_get = mocker.patch.object(Roku, "_get") mocked_get.return_value = serialize_apps(faux_apps) apps = roku.apps assert len(apps) == 1 assert apps[0].id == "0x" assert apps[0].version == "1.2.3" assert apps[0].name == "Fauxku Channel Store"
def test_apps(mocker, roku): faux_apps = (Application('0x', '1.2.3', 'Fauxku Channel Store'),) mocked_get = mocker.patch.object(Roku, '_get') mocked_get.return_value = serialize_apps(faux_apps) apps = roku.apps assert len(apps) == 1 assert apps[0].id == '0x' assert apps[0].version == '1.2.3' assert apps[0].name == 'Fauxku Channel Store'