mirror of https://github.com/zulip/zulip.git
test-backend: Raise zerver/views/events_register.py test coverage to 100%.
This commit is contained in:
parent
1f60baba6b
commit
3127ebfa3b
|
@ -89,7 +89,6 @@ not_yet_fully_covered = {
|
|||
'zerver/views/auth.py',
|
||||
'zerver/views/home.py',
|
||||
'zerver/views/registration.py',
|
||||
'zerver/views/events_register.py',
|
||||
# This one has 1 line that isn't covered in Python 3
|
||||
'zerver/views/upload.py',
|
||||
# Getting this to 100% is a major project goal.
|
||||
|
|
|
@ -92,7 +92,18 @@ import time
|
|||
import ujson
|
||||
from six.moves import range
|
||||
|
||||
class TornadoTest(ZulipTestCase):
|
||||
class EventsEndpointTest(ZulipTestCase):
|
||||
def test_events_register_endpoint(self):
|
||||
# type: () -> None
|
||||
|
||||
# This test is intended to get minimal coverage on
|
||||
# zerver.views.events_register.events_register_backend, so we can have
|
||||
# 100% views coverage.
|
||||
email = 'hamlet@zulip.com'
|
||||
with mock.patch('zerver.views.events_register.do_events_register', return_value={}):
|
||||
result = self.client_post('/json/register', **self.api_auth(email))
|
||||
self.assert_json_success(result)
|
||||
|
||||
def test_tornado_endpoint(self):
|
||||
# type: () -> None
|
||||
|
||||
|
|
Loading…
Reference in New Issue