Show More
@@ -20,6 +20,7 b'' | |||||
20 |
|
20 | |||
21 | import pytest |
|
21 | import pytest | |
22 |
|
22 | |||
|
23 | from rhodecode.events import UserPermissionsChange | |||
23 | from rhodecode.lib.utils2 import StrictAttributeDict |
|
24 | from rhodecode.lib.utils2 import StrictAttributeDict | |
24 | from rhodecode.tests.events.conftest import EventCatcher |
|
25 | from rhodecode.tests.events.conftest import EventCatcher | |
25 |
|
26 | |||
@@ -97,7 +98,7 b' def test_vcs_repo_push_event_serialize(c' | |||||
97 | def test_create_delete_repo_fires_events(backend): |
|
98 | def test_create_delete_repo_fires_events(backend): | |
98 | with EventCatcher() as event_catcher: |
|
99 | with EventCatcher() as event_catcher: | |
99 | repo = backend.create_repo() |
|
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 | with EventCatcher() as event_catcher: |
|
103 | with EventCatcher() as event_catcher: | |
103 | RepoModel().delete(repo) |
|
104 | RepoModel().delete(repo) |
@@ -127,7 +127,7 b' class TestPullRequestModel(object):' | |||||
127 | Session().commit() |
|
127 | Session().commit() | |
128 |
|
128 | |||
129 | prs = PullRequestModel().get_awaiting_my_review( |
|
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 | assert isinstance(prs, list) |
|
131 | assert isinstance(prs, list) | |
132 | assert len(prs) == 1 |
|
132 | assert len(prs) == 1 | |
133 |
|
133 | |||
@@ -138,7 +138,7 b' class TestPullRequestModel(object):' | |||||
138 | Session().commit() |
|
138 | Session().commit() | |
139 |
|
139 | |||
140 | pr_count = PullRequestModel().count_awaiting_my_review( |
|
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 | assert pr_count == 1 |
|
142 | assert pr_count == 1 | |
143 |
|
143 | |||
144 | def test_delete_calls_cleanup_merge(self, pull_request): |
|
144 | def test_delete_calls_cleanup_merge(self, pull_request): |
General Comments 0
You need to be logged in to leave comments.
Login now