def test_get_username_in_last_form_submitted(self): user1, user2 = 'u1', 'u2' app1 = '123' xmlns1 = 'abc' received_on = datetime(2013, 7, 15, 0, 0, 0) self._send_form_to_es(received_on=received_on, user_id=user1, app_id=app1, xmlns=xmlns1, username=user1) self._send_form_to_es(received_on=received_on, user_id=user2, app_id=app1, xmlns=xmlns1, username=user2) user_ids = get_username_in_last_form_user_id_submitted(self.domain, user1) self.assertEqual(user_ids, 'u1') user_ids = get_username_in_last_form_user_id_submitted(self.domain, user2) self.assertEqual(user_ids, 'u2')
def test_get_username_in_last_form_submitted(self): user1, user2 = 'u1', 'u2' app1 = '123' xmlns1 = 'abc' received_on = datetime(2013, 7, 15, 0, 0, 0) self._send_form_to_es(received_on=received_on, user_id=user1, app_id=app1, xmlns=xmlns1, username=user1) self._send_form_to_es(received_on=received_on, user_id=user2, app_id=app1, xmlns=xmlns1, username=user2) user_ids = get_username_in_last_form_user_id_submitted(self.domain, user1) self.assertEqual(user_ids, 'u1') user_ids = get_username_in_last_form_user_id_submitted(self.domain, user2) self.assertEqual(user_ids, 'u2')