Merge ~ines-almeida/launchpad:fix-webhook-unittests into launchpad:master

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 2575bca32a572b5e9d96c2baea05a5db87822fa9
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/launchpad:fix-webhook-unittests
Merge into: launchpad:master
Diff against target: 69 lines (+9/-2)
5 files modified
lib/lp/registry/stories/webservice/xx-distribution-source-package.rst (+1/-0)
lib/lp/registry/stories/webservice/xx-distribution.rst (+1/-0)
lib/lp/registry/stories/webservice/xx-project-registry.rst (+1/-0)
lib/lp/registry/tests/test_product.py (+5/-1)
lib/lp/services/webhooks/tests/test_browser.py (+1/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+444263@code.launchpad.net

Commit message

Update failing unit tests

Description of the change

This fixes some unit tests that failed after merging a previous MP.

Failing tests: http://lpbuildbot.canonical.com/builders/lp-devel-xenial/builds/3796/steps/shell/logs/summary

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/registry/stories/webservice/xx-distribution-source-package.rst b/lib/lp/registry/stories/webservice/xx-distribution-source-package.rst
2index 1ec01b3..a848237 100644
3--- a/lib/lp/registry/stories/webservice/xx-distribution-source-package.rst
4+++ b/lib/lp/registry/stories/webservice/xx-distribution-source-package.rst
5@@ -23,6 +23,7 @@ Source packages can be obtained from the context of a distribution.
6 title: 'mozilla-firefox package in Debian'
7 upstream_product_link: None
8 web_link: 'http://launchpad.../debian/+source/mozilla-firefox'
9+ webhooks_collection_link: 'http.../debian/+source/mozilla-firefox/webhooks'
10
11 It's also possible to search for tasks with the "searchTasks" method:
12
13diff --git a/lib/lp/registry/stories/webservice/xx-distribution.rst b/lib/lp/registry/stories/webservice/xx-distribution.rst
14index de764b4..1d9a8e9 100644
15--- a/lib/lp/registry/stories/webservice/xx-distribution.rst
16+++ b/lib/lp/registry/stories/webservice/xx-distribution.rst
17@@ -73,6 +73,7 @@ And for every distribution we publish most of its attributes.
18 vcs: None
19 vulnerabilities_collection_link: 'http://.../ubuntu/vulnerabilities'
20 web_link: 'http://launchpad.../ubuntu'
21+ webhooks_collection_link: 'http://api.launchpad.../ubuntu/webhooks'
22
23
24 Distribution Custom Operations
25diff --git a/lib/lp/registry/stories/webservice/xx-project-registry.rst b/lib/lp/registry/stories/webservice/xx-project-registry.rst
26index 796f357..37b1061 100644
27--- a/lib/lp/registry/stories/webservice/xx-project-registry.rst
28+++ b/lib/lp/registry/stories/webservice/xx-project-registry.rst
29@@ -221,6 +221,7 @@ Projects are available at their canonical URL on the API virtual host.
30 translation_focus_link: None
31 vcs: None
32 web_link: 'http://launchpad.../firefox'
33+ webhooks_collection_link: 'http://api.launchpad.../firefox/webhooks'
34 wiki_url: None
35
36 In Launchpad project names may not have uppercase letters in their
37diff --git a/lib/lp/registry/tests/test_product.py b/lib/lp/registry/tests/test_product.py
38index 82cf161..8738a3e 100644
39--- a/lib/lp/registry/tests/test_product.py
40+++ b/lib/lp/registry/tests/test_product.py
41@@ -1113,11 +1113,15 @@ class TestProduct(TestCaseWithFactory):
42 "launchpad.Driver": {"newSeries"},
43 "launchpad.Edit": {
44 "addOfficialBugTag",
45+ "checkInformationType",
46+ "default_webhook_event_types",
47+ "newWebhook",
48 "removeOfficialBugTag",
49 "setBranchSharingPolicy",
50 "setBugSharingPolicy",
51 "setSpecificationSharingPolicy",
52- "checkInformationType",
53+ "valid_webhook_event_types",
54+ "webhooks",
55 },
56 "launchpad.Moderate": {
57 "is_permitted",
58diff --git a/lib/lp/services/webhooks/tests/test_browser.py b/lib/lp/services/webhooks/tests/test_browser.py
59index 7542cae..4392228 100644
60--- a/lib/lp/services/webhooks/tests/test_browser.py
61+++ b/lib/lp/services/webhooks/tests/test_browser.py
62@@ -182,7 +182,7 @@ class BugUpdateTestHelpersBase:
63
64 event_type = "bug:0.1"
65 expected_event_types = [
66- ("bug:0.1", "Bug change"),
67+ ("bug:0.1", "Bug creation/change"),
68 ("bug:comment:0.1", "Bug comment"),
69 ]
70

Subscribers

People subscribed via source and target branches

to status/vote changes: