'Verifies that the correct view event was captured for the profile page.'

def verify_profile_page_view_event(self, requesting_username, profile_user_id, visibility=None):

    actual_events = self.wait_for_events(start_time=self.start_time, event_filter={'event_type': 'edx.user.settings.viewed', 'username': requesting_username}, number_of_matches=1)
    self.assert_events_match([{'username': requesting_username, 'event': {'user_id': int(profile_user_id), 'page': 'profile', 'visibility': unicode(visibility)}}], actual_events)
