

def test_content_subscription(reddit, oauth, refresh_token, terminal):
    with terminal.loader():
        SubscriptionContent.from_user(reddit, terminal.loader)
    assert isinstance(terminal.loader.exception, praw.errors.LoginOrScopeRequired)
    oauth.config.refresh_token = refresh_token
    oauth.authorize()
    with terminal.loader():
        content = SubscriptionContent.from_user(reddit, terminal.loader)
    assert (terminal.loader.exception is None)
    assert (content.name == 'Subscriptions')
    assert (content.order is None)
    for data in content.iterate(0, 1, 70):
        assert all(((k in data) for k in ('object', 'n_rows', 'offset', 'type', 'title', 'split_title')))
        for val in data.values():
            assert (not isinstance(val, six.binary_type))

dataset/ETHPy150Open michael-lazar/rtv/tests/test_content.py test_content_subscription/original