Ejemplo n.º 1
0
 def test_get_summary_of_today(self):
     prep_dict = user.get_summary_of_today(self.user_tobi)
     self.assertEqual(self.user_tobi.nickname, prep_dict['firstname'])
     self.assertLessEqual(0, prep_dict['discussion_arg_clicks'])
     self.assertLessEqual(0, prep_dict['discussion_stat_clicks'])
     self.assertLessEqual(0, prep_dict['statements_posted'])
     self.assertLessEqual(0, prep_dict['edits_done'])
Ejemplo n.º 2
0
def exit(ui_locales: str, db_user: User) -> dict:
    """
    Exit the discussion. Creates helper and returns a dictionary containing the summary of today.

    :param ui_locales:
    :param db_user:
    :rtype: dict
    :return: prepared collection with summary of current day's actions of the user
    """
    return {
        'title': Translator(ui_locales).get(_.finishTitle),
        'summary': user.get_summary_of_today(db_user)
    }