Ejemplo n.º 1
0
def get_user_history(request):
    """
    Request the complete user track.

    :param request: current request of the server
    :return: json-dict()
    """
    ui_locales = get_language_from_cookie(request)
    db_user = request.validated['user']
    return history_handler.get_from_database(db_user, ui_locales)
Ejemplo n.º 2
0
 def test_get_history_from_database(self):
     big_fucking_link = 'cat-or-dog/justify/13/agree/undercut?history=/attitude/2-/justify/2/t-/reaction/12/undercut/13'
     history.save_database(self.user_tobi, 'cat-or-dog', big_fucking_link,
                           self.history)
     hist = history.get_from_database(self.user_tobi, 'en')
     self.assertGreater(len(hist), 0)