Merge lp:~dholbach/help-app/test-suite-fixes into lp:~ubuntu-touch-coreapps-drivers/help-app/trunk

Proposed by Daniel Holbach
Status: Merged
Merged at revision: 90
Proposed branch: lp:~dholbach/help-app/test-suite-fixes
Merge into: lp:~ubuntu-touch-coreapps-drivers/help-app/trunk
Diff against target: 33 lines (+6/-4)
2 files modified
edit-here/tests/test_links.py (+2/-1)
edit-here/translations.py (+4/-3)
To merge this branch: bzr merge lp:~dholbach/help-app/test-suite-fixes
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Approve
Review via email: mp+252480@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Nicholas Skaggs (nskaggs) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'edit-here/tests/test_links.py'
2--- edit-here/tests/test_links.py 2015-03-10 15:00:06 +0000
3+++ edit-here/tests/test_links.py 2015-03-10 17:21:12 +0000
4@@ -32,7 +32,8 @@
5 for name, value in attrs:
6 if name == "href":
7 url = urllib.parse.urlparse(value)
8- if value != '#' and url.netloc in [None, '', 'localhost']:
9+ if not value.startswith('#') and \
10+ url.netloc in [None, '', 'localhost']:
11 self.links += [value]
12
13 def reload(self):
14
15=== modified file 'edit-here/translations.py'
16--- edit-here/translations.py 2015-03-10 17:07:05 +0000
17+++ edit-here/translations.py 2015-03-10 17:21:12 +0000
18@@ -115,12 +115,13 @@
19 entry.msgstr = entry.msgid
20 self.save()
21
22- def replace_title_lines(self):
23- results = {}
24+ def find_title_lines(self):
25+ results = []
26 for entry in self.find_in_msgid('Title: '):
27 if entry.msgid.startswith('Title: '):
28 where = entry.occurrences[0][0]
29- first_line = codecs.open(where, encoding='utf-8').readline().strip()
30+ first_line = codecs.open(where,
31+ encoding='utf-8').readline().strip()
32 results += [(entry, first_line)]
33 return results
34

Subscribers

People subscribed via source and target branches