'Call the event specified by the handler with the resource, and check
whether the element (resp_key) in response is as expected (resp_val)'

def check_event_response_by_element(self, handler, resource, resp_key, resp_val, xblock_name=None):

    if (xblock_name is None):
        xblock_name = TestCrowdsourceHinter.XBLOCK_NAMES[0]
    resp = self.call_event(handler, resource, xblock_name)
    self.assertEqual(resp[resp_key], resp_val)
    self.assert_request_status_code(200, self.course_url)
