tests: Add capture_event() helper.
tests: Add capture_event() helper.

For many actions, we make a single call to
send_event, and it's kind of heavy now to
properly assert we made one call, and we
don't need to exercise all the tornado code
to prove that the action was written correctly.

shubhamdhama/zulip,rishig/zulip,brainwane/zulip,tommyip/zulip,synicalsyntax/zulip,tommyip/zulip,andersk/zulip,dhcrzf/zulip,zulip/zulip,hackerkid/zulip,dhcrzf/zulip,timabbott/zulip,punchagan/zulip,kou/zulip,shubhamdhama/zulip,showell/zulip,brainwane/zulip,kou/zulip,rht/zulip,kou/zulip,showell/zulip,synicalsyntax/zulip,eeshangarg/zulip,rht/zulip,zulip/zulip,kou/zulip,andersk/zulip,shubhamdhama/zulip,timabbott/zulip,synicalsyntax/zulip,zulip/zulip,synicalsyntax/zulip,eeshangarg/zulip,tommyip/zulip,zulip/zulip,brainwane/zulip,rishig/zulip,rishig/zulip,timabbott/zulip,hackerkid/zulip,brainwane/zulip,showell/zulip,showell/zulip,eeshangarg/zulip,dhcrzf/zulip,kou/zulip,punchagan/zulip,showell/zulip,dhcrzf/zulip,dhcrzf/zulip,rht/zulip,andersk/zulip,andersk/zulip,eeshangarg/zulip,synicalsyntax/zulip,andersk/zulip,dhcrzf/zulip,showell/zulip,synicalsyntax/zulip,rishig/zulip,shubhamdhama/zulip,eeshangarg/zulip,tommyip/zulip,synicalsyntax/zulip,punchagan/zulip,kou/zulip,rht/zulip,zulip/zulip,shubhamdhama/zulip,andersk/zulip,hackerkid/zulip,brainwane/zulip,brainwane/zulip,dhcrzf/zulip,timabbott/zulip,showell/zulip,eeshangarg/zulip,rishig/zulip,punchagan/zulip,andersk/zulip,shubhamdhama/zulip,hackerkid/zulip,hackerkid/zulip,tommyip/zulip,timabbott/zulip,eeshangarg/zulip,kou/zulip,timabbott/zulip,brainwane/zulip,punchagan/zulip,timabbott/zulip,rht/zulip,punchagan/zulip,tommyip/zulip,rishig/zulip,shubhamdhama/zulip,hackerkid/zulip,hackerkid/zulip,rishig/zulip,zulip/zulip,tommyip/zulip,rht/zulip,zulip/zulip,rht/zulip,punchagan/zulip