(self, reddit)
| 16 | reddit.submission("4b1tfm").hide() |
| 17 | |
| 18 | def test_raise_api_exception(self, reddit): |
| 19 | message = "USER_REQUIRED: 'Please log in to do that.'" |
| 20 | submission = reddit.submission("4b536h") |
| 21 | with pytest.raises(RedditAPIException) as excinfo: |
| 22 | submission.mod.approve() |
| 23 | assert excinfo.value.items[0].error_type == "USER_REQUIRED" |
| 24 | assert str(excinfo.value.items[0]) == message |
nothing calls this directly
no test coverage detected