'Test behaviour of "Email" field.'

def test_email_field(self):

    email = u'test@example.com'
    (username, user_id) = self.log_in_as_unique_user(email=email)
    self.visit_account_settings_page()
    self._test_text_field(u'email', u'Email    Address', email, (u'test@example.com' + XSS_INJECTION), [u'me@here.com', u'you@there.com'], success_message='Click    the    link    in    the    message    to    update    your    email    address.', assert_after_reload=False)
    actual_events = self.wait_for_events(event_filter=self.settings_change_initiated_event_filter, number_of_matches=2)
    self.assert_events_match([self.expected_settings_change_initiated_event('email', email, 'me@here.com', username=username, user_id=user_id), self.expected_settings_change_initiated_event('email', email, 'you@there.com', username=username, user_id=user_id)], actual_events)
    self.assert_no_setting_changed_event()
