def test_list_view():
    assert filter(
        wv_comment,
        wv.wunder_view(
            mock_client({
                'folders':
                constant([]),
                'lists':
                constant(map(mock_api_object, "These are test lists".split()))
            }))) == "These are test lists".split()
Exemple #2
0
def test_with_folders():
    assert filter(
        wv_comment,
        wv.wunder_view(
            mock_client(
                {
                    "folders": constant([mock_api_object("my_folder", additional={"list_ids": [1, 2]})]),
                    "lists": constant(mock_api_object(l, id=i) for i, l in enumerate("These are test lists".split())),
                }
            )
        ),
    ) == ["These", "my_folder", "  are", "  test", "lists"]
Exemple #3
0
def test_list_view():
    assert (
        filter(
            wv_comment,
            wv.wunder_view(
                mock_client(
                    {"folders": constant([]), "lists": constant(map(mock_api_object, "These are test lists".split()))}
                )
            ),
        )
        == "These are test lists".split()
    )
def test_with_folders():
    assert filter(
        wv_comment,
        wv.wunder_view(
            mock_client({
                'folders':
                constant([
                    mock_api_object("my_folder",
                                    additional={'list_ids': [1, 2]})
                ]),
                'lists':
                constant(
                    mock_api_object(l, id=i)
                    for i, l in enumerate("These are test lists".split()))
            }))) == ["These", "my_folder", "  are", "  test", "lists"]