MCPcopy
hub / github.com/praw-dev/praw / test_objectify__errors_null

Method test_objectify__errors_null

tests/integration/test_objector.py:11–16  ·  view source on GitHub ↗
(self, reddit)

Source from the content-addressed store, hash-verified

9
10class TestObjector(IntegrationTest):
11 def test_objectify__errors_null(self, reddit):
12 # Some endpoints (e.g. api/hide) now respond with {"json": {"errors":
13 # null}} rather than an empty list. ``objectify`` must treat null like an
14 # empty list and not raise (previously ``len(None)`` raised TypeError).
15 reddit.read_only = False
16 reddit.submission("4b1tfm").hide()
17
18 def test_raise_api_exception(self, reddit):
19 message = "USER_REQUIRED: 'Please log in to do that.'"

Callers

nothing calls this directly

Calls 2

hideMethod · 0.45
submissionMethod · 0.45

Tested by

no test coverage detected