launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05604
[Merge] lp:~allenap/launchpad/a-moment-ago-1 into lp:launchpad
Gavin Panella has proposed merging lp:~allenap/launchpad/a-moment-ago-1 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~allenap/launchpad/a-moment-ago-1/+merge/82706
Remove some more matches against "a moment ago".
--
https://code.launchpad.net/~allenap/launchpad/a-moment-ago-1/+merge/82706
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/launchpad/a-moment-ago-1 into lp:launchpad.
=== modified file 'lib/lp/blueprints/browser/tests/test_specification.py'
--- lib/lp/blueprints/browser/tests/test_specification.py 2011-10-23 00:55:30 +0000
+++ lib/lp/blueprints/browser/tests/test_specification.py 2011-11-18 16:33:27 +0000
@@ -8,10 +8,7 @@
import unittest
import pytz
-from testtools.matchers import (
- DocTestMatches,
- Equals,
- )
+from testtools.matchers import Equals
from zope.component import getUtility
from zope.publisher.interfaces import NotFound
from zope.security.proxy import removeSecurityProxy
@@ -35,6 +32,7 @@
person_logged_in,
TestCaseWithFactory,
)
+from lp.testing.matchers import DocTestMatches
from lp.testing.views import create_initialized_view
@@ -158,12 +156,7 @@
spec, '+index')()
self.assertThat(
extract_text(html), DocTestMatches(
- extract_text(
- "... Registered by Some Person a moment ago ..."),
- (
- doctest.ELLIPSIS |
- doctest.NORMALIZE_WHITESPACE |
- doctest.REPORT_NDIFF)))
+ "... Registered by Some Person ... ago ..."))
class TestSpecificationEditStatusView(TestCaseWithFactory):
=== modified file 'lib/lp/code/browser/tests/test_branchlisting.py'
--- lib/lp/code/browser/tests/test_branchlisting.py 2011-11-11 14:12:08 +0000
+++ lib/lp/code/browser/tests/test_branchlisting.py 2011-11-18 16:33:27 +0000
@@ -11,6 +11,7 @@
import re
from lazr.uri import URI
+from lxml import html
import soupmatchers
from storm.expr import (
Asc,
@@ -59,6 +60,7 @@
time_counter,
)
from lp.testing.factory import remove_security_proxy_and_shout_at_engineer
+from lp.testing.matchers import DocTestMatches
from lp.testing.sampledata import (
ADMIN_EMAIL,
COMMERCIAL_ADMIN_EMAIL,
@@ -554,9 +556,12 @@
branch = self.factory.makeBranch(sourcepackage=source_package)
view = create_initialized_view(
dsp, name='+code-index', rootsite='code')
- html = view()
- self.assertIn(branch.name, html)
- self.assertIn('a moment ago</span>\n', html)
+ root = html.fromstring(view())
+ [series_branches_table] = root.cssselect("table#series-branches")
+ series_branches_last_row = series_branches_table.cssselect("tr")[-1]
+ self.assertThat(
+ series_branches_last_row.text_content(),
+ DocTestMatches("%s ... ago" % branch.displayname))
class TestDevelopmentFocusPackageBranches(TestCaseWithFactory):
Follow ups