Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
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'
Exemple #4
0
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"
Exemple #5
0
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'