##// END OF EJS Templates
tests: fixed some tests
super-admin -
r4704:fa2afbc9 stable
parent child Browse files
Show More
@@ -20,6 +20,7 b''
20 20
21 21 import pytest
22 22
23 from rhodecode.events import UserPermissionsChange
23 24 from rhodecode.lib.utils2 import StrictAttributeDict
24 25 from rhodecode.tests.events.conftest import EventCatcher
25 26
@@ -97,7 +98,7 b' def test_vcs_repo_push_event_serialize(c'
97 98 def test_create_delete_repo_fires_events(backend):
98 99 with EventCatcher() as event_catcher:
99 100 repo = backend.create_repo()
100 assert event_catcher.events_types == [RepoPreCreateEvent, RepoCreateEvent]
101 assert event_catcher.events_types == [RepoPreCreateEvent, RepoCreateEvent, UserPermissionsChange]
101 102
102 103 with EventCatcher() as event_catcher:
103 104 RepoModel().delete(repo)
@@ -127,7 +127,7 b' class TestPullRequestModel(object):'
127 127 Session().commit()
128 128
129 129 prs = PullRequestModel().get_awaiting_my_review(
130 pull_request.target_repo, user_id=pull_request.author.user_id)
130 pull_request.target_repo.repo_name, user_id=pull_request.author.user_id)
131 131 assert isinstance(prs, list)
132 132 assert len(prs) == 1
133 133
@@ -138,7 +138,7 b' class TestPullRequestModel(object):'
138 138 Session().commit()
139 139
140 140 pr_count = PullRequestModel().count_awaiting_my_review(
141 pull_request.target_repo, user_id=pull_request.author.user_id)
141 pull_request.target_repo.repo_name, user_id=pull_request.author.user_id)
142 142 assert pr_count == 1
143 143
144 144 def test_delete_calls_cleanup_merge(self, pull_request):
General Comments 0
You need to be logged in to leave comments. Login now