Skip to content

Commit

Permalink
Add test for Reddit.close()
Browse files Browse the repository at this point in the history
Signed-off-by: LilSpazJoekp <15524072+LilSpazJoekp@users.noreply.github.com>
  • Loading branch information
LilSpazJoekp committed Dec 28, 2020
1 parent 11d6298 commit 84515bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/test_reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ class TestReddit(UnitTest):
x: "dummy" for x in ["client_id", "client_secret", "user_agent"]
}

async def test_close_session(self):
assert not self.reddit.requestor._http.closed
async with self.reddit as reddit:
pass
assert reddit.requestor._http.closed and self.reddit.requestor._http.closed

def test_comment(self):
assert Comment(self.reddit, id="cklfmye").id == "cklfmye"

Expand Down

0 comments on commit 84515bd

Please sign in to comment.