Example #1
0
def get_all_edits_of_user(request):
    """
    Request for all edits of the user

    :param request: current request of the server
    :return: json-dict()
    """
    ui_locales = get_language_from_cookie(request)
    db_user = request.validated['user']
    return user.get_textversions(db_user, ui_locales).get('edits', [])
Example #2
0
 def test_get_textversions(self):
     d = user.get_textversions(self.user_tobi, 'en')
     self.assertGreaterEqual(0, len(d.get('statements', [])))
     self.assertGreaterEqual(0, len(d.get('edits', [])))
Example #3
0
 def test_get_textversions(self):
     d = user.get_textversions(self.user, 'en')
     assert_greater_equal(0, len(d.get('statements', [])))
     assert_greater_equal(0, len(d.get('edits', [])))