Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
LilSpazJoekp committed Nov 11, 2021
1 parent db81595 commit 75d8ae9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/unit/test_deprecations.py
Expand Up @@ -40,6 +40,15 @@ def test_gold_method(self):
== "`subreddits.gold` has be renamed to `subreddits.premium`."
)

async def test_lazy_argument_rename(self):
with pytest.deprecated_call() as warning_info:
await self.reddit.submission("1234", lazy=True)
assert (
str(warning_info.list[0].message)
== "The parameter ``lazy`` has been renamed to ``fetch`` and support for"
" the ``lazy`` parameter will be removed in a future version of Async PRAW."
)

def test_praw_exception_rename(self):
with pytest.raises(AsyncPRAWException):
Reddit()
Expand Down

0 comments on commit 75d8ae9

Please sign in to comment.