Fix test_pointer_events by having it call do_update_pointer.

Before this change, the test_pointer_events test wasn't really
testing anything, because it wasn't getting to do_update_pointer
due to authentication issues and having an invalid message id.

Calling do_update_pointer() directly exercises the events code.

(imported from commit bfac27dcfe659689535f54e0c837427c4f9a8284)
This commit is contained in:
Steve Howell 2014-02-02 09:14:57 -05:00
parent e8d4723d44
commit cfb2312cb6
1 changed files with 2 additions and 2 deletions

View File

@ -22,6 +22,7 @@ from zerver.lib.actions import (
do_rename_stream,
do_set_muted_topics,
do_set_realm_name,
do_update_pointer,
fetch_initial_state_data,
)
@ -199,8 +200,7 @@ class EventsRegisterTest(AuthedTestCase):
self.do_test(lambda: self.send_message("hamlet@zulip.com", "Verona", Recipient.STREAM, "hello"))
def test_pointer_events(self):
self.login('hamlet@zulip.com')
self.do_test(lambda: self.client.post("/json/update_pointer", {"pointer": 150}))
self.do_test(lambda: do_update_pointer(self.user_profile, 1500))
def test_register_events(self):
self.do_test(lambda: self.register("test1", "test1"),