MCPcopy Index your code
hub / github.com/praw-dev/praw / test_check_error

Method test_check_error

tests/unit/test_objector.py:9–15  ·  view source on GitHub ↗
(self, reddit)

Source from the content-addressed store, hash-verified

7
8class TestObjector(UnitTest):
9 def test_check_error(self, reddit):
10 objector = reddit._objector
11 objector.check_error({"asdf": 1})
12
13 error_response = {"json": {"errors": [["USER_REQUIRED", "Please log in to do that.", None]]}}
14 with pytest.raises(RedditAPIException):
15 objector.check_error(error_response)
16
17 def test_objectify_returns_None_for_None(self, reddit):
18 assert reddit._objector.objectify(data=None) is None

Callers

nothing calls this directly

Calls 1

check_errorMethod · 0.80

Tested by

no test coverage detected