Changeset - e81332582fc9
[Not reviewed]
default
0 7 0
Mads Kiilerich - 8 years ago 2017-09-14 02:08:06
mads@kiilerich.com
controllers: drop unused totalRecords and startIndex

We don't want it just for testing.
7 files changed with 5 insertions and 13 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/admin/repo_groups.py
Show inline comments
 
@@ -141,8 +141,6 @@ class RepoGroupsController(BaseControlle
 
            })
 

	
 
        c.data = {
 
            "totalRecords": total_records,
 
            "startIndex": 0,
 
            "sort": None,
 
            "dir": "asc",
 
            "records": repo_groups_data
kallithea/controllers/admin/user_groups.py
Show inline comments
 
@@ -119,8 +119,6 @@ class UserGroupsController(BaseControlle
 
            })
 

	
 
        c.data = {
 
            "totalRecords": total_records,
 
            "startIndex": 0,
 
            "sort": None,
 
            "dir": "asc",
 
            "records": user_groups_data
kallithea/controllers/admin/users.py
Show inline comments
 
@@ -103,8 +103,6 @@ class UsersController(BaseController):
 
            })
 

	
 
        c.data = {
 
            "totalRecords": total_records,
 
            "startIndex": 0,
 
            "sort": None,
 
            "dir": "asc",
 
            "records": users_data
kallithea/model/repo.py
Show inline comments
 
@@ -230,8 +230,6 @@ class RepoModel(object):
 
            repos_data.append(row)
 

	
 
        return {
 
            "totalRecords": len(repos_list),
 
            "startIndex": 0,
 
            "sort": "name",
 
            "dir": "asc",
 
            "records": repos_data
kallithea/tests/functional/test_home.py
Show inline comments
 
@@ -20,7 +20,6 @@ class TestHomeController(TestController)
 
        response.mustcontain('<span class="repotag">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\"')
kallithea/tests/functional/test_my_account.py
Show inline comments
 
@@ -32,7 +32,8 @@ class TestMyAccountController(TestContro
 
        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 @@ class TestMyAccountController(TestContro
 

	
 
        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()
kallithea/tests/functional/test_repo_groups.py
Show inline comments
 
@@ -6,7 +6,7 @@ class TestRepoGroupsController(TestContr
 
    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 @@ class TestRepoGroupsController(TestContr
 

	
 
        # listing
 
        response = self.app.get(url('repos_groups'))
 
        response.mustcontain('"totalRecords": 1')
 
        response.mustcontain('raw_name": "%s"' % group_name)
 

	
 
        # show
0 comments (0 inline, 0 general)