def test_content_subscription(reddit, oauth, refresh_token, terminal):

    # Not logged in
    with terminal.loader():
        SubscriptionContent.from_user(reddit, terminal.loader)
    assert isinstance(
        terminal.loader.exception, praw.errors.LoginOrScopeRequired)

    # Logged in
    oauth.config.refresh_token = refresh_token
    oauth.authorize()
    with terminal.loader():
        content = SubscriptionContent.from_user(reddit, terminal.loader)
    assert terminal.loader.exception is None

    # These are static
    assert content.name == 'Subscriptions'
    assert content.order <= None

    # Validate content
    for data in content.iterate(0, 1, 70):
        assert all(k in data for k in ('object', 'n_rows', 'offset', 'type',
                                       'title', 'split_title'))
        # All text should be converted to unicode by this point
        for val in data.values():
            assert not isinstance(val, six.binary_type)
dataset/ETHPy150Open michael-lazar/rtv/tests/test_content.py/test_content_subscription/operator `is` -> `<=`