# HG changeset patch # User Mads Kiilerich # Date 1505347686 -7200 # Node ID e81332582fc9c97a2725cc1f8128cd6a5ccbc381 # Parent 06ef965e4b62bf8eb84072e2960c06ed939d562c controllers: drop unused totalRecords and startIndex We don't want it just for testing. diff -r 06ef965e4b62 -r e81332582fc9 kallithea/controllers/admin/repo_groups.py --- a/kallithea/controllers/admin/repo_groups.py Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/controllers/admin/repo_groups.py Thu Sep 14 02:08:06 2017 +0200 @@ -141,8 +141,6 @@ }) c.data = { - "totalRecords": total_records, - "startIndex": 0, "sort": None, "dir": "asc", "records": repo_groups_data diff -r 06ef965e4b62 -r e81332582fc9 kallithea/controllers/admin/user_groups.py --- a/kallithea/controllers/admin/user_groups.py Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/controllers/admin/user_groups.py Thu Sep 14 02:08:06 2017 +0200 @@ -119,8 +119,6 @@ }) c.data = { - "totalRecords": total_records, - "startIndex": 0, "sort": None, "dir": "asc", "records": user_groups_data diff -r 06ef965e4b62 -r e81332582fc9 kallithea/controllers/admin/users.py --- a/kallithea/controllers/admin/users.py Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/controllers/admin/users.py Thu Sep 14 02:08:06 2017 +0200 @@ -103,8 +103,6 @@ }) c.data = { - "totalRecords": total_records, - "startIndex": 0, "sort": None, "dir": "asc", "records": users_data diff -r 06ef965e4b62 -r e81332582fc9 kallithea/model/repo.py --- a/kallithea/model/repo.py Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/model/repo.py Thu Sep 14 02:08:06 2017 +0200 @@ -230,8 +230,6 @@ repos_data.append(row) return { - "totalRecords": len(repos_list), - "startIndex": 0, "sort": "name", "dir": "asc", "records": repos_data diff -r 06ef965e4b62 -r e81332582fc9 kallithea/tests/functional/test_home.py --- a/kallithea/tests/functional/test_home.py Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/tests/functional/test_home.py Thu Sep 14 02:08:06 2017 +0200 @@ -20,7 +20,6 @@ response.mustcontain('git') # html in javascript variable: - response.mustcontain('var data = ({"totalRecords": %s' % Repository.query().count()) response.mustcontain(r'href=\"/%s\"' % HG_REPO) response.mustcontain(r'\x3ci class=\"icon-globe\"') diff -r 06ef965e4b62 -r e81332582fc9 kallithea/tests/functional/test_my_account.py --- a/kallithea/tests/functional/test_my_account.py Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/tests/functional/test_my_account.py Thu Sep 14 02:08:06 2017 +0200 @@ -32,7 +32,8 @@ response = self.app.get(url('my_account_repos')) cnt = Repository.query().filter(Repository.owner == User.get_by_username(TEST_USER_ADMIN_LOGIN)).count() - response.mustcontain('"totalRecords": %s' % cnt) + response.mustcontain('"raw_name": "%s"' % HG_REPO) + response.mustcontain('"just_name": "%s"' % GIT_REPO) def test_my_account_my_watched(self): self.log_user() @@ -40,7 +41,8 @@ cnt = UserFollowing.query().filter(UserFollowing.user == User.get_by_username(TEST_USER_ADMIN_LOGIN)).count() - response.mustcontain('"totalRecords": %s' % cnt) + response.mustcontain('"raw_name": "%s"' % HG_REPO) + response.mustcontain('"just_name": "%s"' % GIT_REPO) def test_my_account_my_emails(self): self.log_user() diff -r 06ef965e4b62 -r e81332582fc9 kallithea/tests/functional/test_repo_groups.py --- a/kallithea/tests/functional/test_repo_groups.py Thu Sep 14 02:08:06 2017 +0200 +++ b/kallithea/tests/functional/test_repo_groups.py Thu Sep 14 02:08:06 2017 +0200 @@ -6,7 +6,7 @@ def test_index(self): self.log_user() response = self.app.get(url('repos_groups')) - response.mustcontain('{"totalRecords": 0, "sort": null, "startIndex": 0, "dir": "asc", "records": []}') + response.mustcontain('"records": []') def test_new(self): self.log_user() @@ -57,7 +57,6 @@ # listing response = self.app.get(url('repos_groups')) - response.mustcontain('"totalRecords": 1') response.mustcontain('raw_name": "%s"' % group_name) # show