Merge ~cjwatson/launchpad:testfix-git-branch-picker-resubmit into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 3db9efde2710aa7900894f8b64661d7e02092646
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:testfix-git-branch-picker-resubmit
Merge into: launchpad:master
Diff against target: 41 lines (+15/-11)
1 file modified
lib/lp/code/browser/tests/test_branchmergeproposal.py (+15/-11)
Reviewer Review Type Date Requested Status
Thiago F. Pappacena (community) Approve
Review via email: mp+394508@code.launchpad.net

Commit message

Fix TestResubmitBrowserGit for new branch picker

To post a comment you must log in.
Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/code/browser/tests/test_branchmergeproposal.py b/lib/lp/code/browser/tests/test_branchmergeproposal.py
2index 4fa7ed1..eacb6e3 100644
3--- a/lib/lp/code/browser/tests/test_branchmergeproposal.py
4+++ b/lib/lp/code/browser/tests/test_branchmergeproposal.py
5@@ -1,3 +1,7 @@
6+# -*- coding: utf-8 -*-
7+# NOTE: The first line above must stay first; do not move the copyright
8+# notice to the top. See http://www.python.org/dev/peps/pep-0263/.
9+#
10 # Copyright 2009-2019 Canonical Ltd. This software is licensed under the
11 # GNU Affero General Public License version 3 (see the file LICENSE).
12
13@@ -1322,17 +1326,17 @@ class TestResubmitBrowserGit(GitHostingClientMixin, BrowserTestCase):
14 """The text of the resubmit page is as expected."""
15 bmp = self.factory.makeBranchMergeProposalForGit(registrant=self.user)
16 text = self.getMainText(bmp, '+resubmit')
17- expected = (
18- 'Resubmit proposal to merge.*'
19- 'Source Git repository:.*'
20- 'Source Git branch path:.*'
21- 'Target Git repository:.*'
22- 'Target Git branch path:.*'
23- 'Prerequisite Git repository:.*'
24- 'Prerequisite Git branch path:.*'
25- 'Description.*'
26- 'Start afresh.*')
27- self.assertTextMatchesExpressionIgnoreWhitespace(expected, text)
28+ self.assertTextMatchesExpressionIgnoreWhitespace(r"""
29+ Resubmit proposal to merge.*
30+ Source Git branch:.*
31+ Repository: \(Find…\) Branch: \(Find…\)
32+ Target Git branch:.*
33+ Repository: \(Find…\) Branch: \(Find…\)
34+ Prerequisite Git branch:.*
35+ Repository: \(Find…\) Branch: \(Find…\)
36+ Description.*
37+ Start afresh.*
38+ """, text)
39
40 def test_resubmit_controls(self):
41 """Proposals can be resubmitted using the browser."""

Subscribers

People subscribed via source and target branches

to status/vote changes: