##// END OF EJS Templates
fixed tests
marcink -
r3215:cbc63abe beta
parent child Browse files
Show More
@@ -539,6 +539,7 b' class BaseTestApi(object):'
539 ret = repo.get_api_data()
539 ret = repo.get_api_data()
540
540
541 members = []
541 members = []
542 followers = []
542 for user in repo.repo_to_perm:
543 for user in repo.repo_to_perm:
543 perm = user.permission.permission_name
544 perm = user.permission.permission_name
544 user = user.user
545 user = user.user
@@ -555,7 +556,11 b' class BaseTestApi(object):'
555 users_group_data['permission'] = perm
556 users_group_data['permission'] = perm
556 members.append(users_group_data)
557 members.append(users_group_data)
557
558
559 for user in repo.followers:
560 followers.append(user.user.get_api_data())
561
558 ret['members'] = members
562 ret['members'] = members
563 ret['followers'] = followers
559
564
560 expected = ret
565 expected = ret
561 self._compare_ok(id_, expected, given=response.body)
566 self._compare_ok(id_, expected, given=response.body)
@@ -570,6 +575,7 b' class BaseTestApi(object):'
570 ret = repo.get_api_data()
575 ret = repo.get_api_data()
571
576
572 members = []
577 members = []
578 followers = []
573 for user in repo.repo_to_perm:
579 for user in repo.repo_to_perm:
574 perm = user.permission.permission_name
580 perm = user.permission.permission_name
575 user = user.user
581 user = user.user
@@ -585,8 +591,12 b' class BaseTestApi(object):'
585 users_group_data['type'] = "users_group"
591 users_group_data['type'] = "users_group"
586 users_group_data['permission'] = perm
592 users_group_data['permission'] = perm
587 members.append(users_group_data)
593 members.append(users_group_data)
588
594
595 for user in repo.followers:
596 followers.append(user.user.get_api_data())
597
589 ret['members'] = members
598 ret['members'] = members
599 ret['followers'] = followers
590
600
591 expected = ret
601 expected = ret
592 self._compare_ok(id_, expected, given=response.body)
602 self._compare_ok(id_, expected, given=response.body)
@@ -14,7 +14,7 b' class TestHomeController(TestController)'
14 self.log_user()
14 self.log_user()
15 response = self.app.get(url(controller='home', action='index'))
15 response = self.app.get(url(controller='home', action='index'))
16 #if global permission is set
16 #if global permission is set
17 response.mustcontain('ADD REPOSITORY')
17 response.mustcontain('Add repository')
18 response.mustcontain('href="/%s/summary"' % HG_REPO)
18 response.mustcontain('href="/%s/summary"' % HG_REPO)
19
19
20 response.mustcontain("""<img class="icon" title="Mercurial repository" """
20 response.mustcontain("""<img class="icon" title="Mercurial repository" """
General Comments 0
You need to be logged in to leave comments. Login now