How to use the apraw.models function in aPRAW

To help you get started, we’ve selected a few aPRAW examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Dan6erbond / aPRAW / tests / integration / models / test_subreddit_wiki.py View on Github external
async def test_subreddit_wiki_revisions(self, reddit):
        subreddit = await reddit.subreddit("aprawtest")

        async for revision in subreddit.wiki.revisions():
            assert hasattr(revision, "page")
            assert isinstance(revision, apraw.models.WikipageRevision)
            assert isinstance(revision.author, apraw.models.Redditor)
github Dan6erbond / aPRAW / tests / integration / models / test_subreddit.py View on Github external
async def test_subreddit_moderation_listing(self, reddit):
        subreddit = await reddit.subreddit("aprawtest")
        report = None

        async for rep in subreddit.mod.reports():
            report = rep
            break

        assert isinstance(
            report, apraw.models.submission.Submission) or isinstance(
            report, apraw.models.comment.Comment)
github Dan6erbond / aPRAW / tests / integration / models / test_subreddit_wiki.py View on Github external
async def test_subreddit_wiki_revisions(self, reddit):
        subreddit = await reddit.subreddit("aprawtest")

        async for revision in subreddit.wiki.revisions():
            assert hasattr(revision, "page")
            assert isinstance(revision, apraw.models.WikipageRevision)
            assert isinstance(revision.author, apraw.models.Redditor)
github Dan6erbond / aPRAW / tests / integration / test_reddit.py View on Github external
async def test_reddit_subreddits(self, reddit: apraw.Reddit):
        subreddit = None

        async for sub in reddit.subreddits():
            subreddit = sub
            break

        assert isinstance(subreddit, apraw.models.Subreddit)
github Dan6erbond / aPRAW / tests / integration / models / test_user.py View on Github external
async def test_user_sent(self, reddit):
        user = await reddit.user.me()

        async for item in user.sent():
            assert isinstance(item, apraw.models.Comment) or isinstance(item, apraw.models.Message)