~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/tests/test_distroseries.py

[r=allenap][bug=828015] Further fixes/improvements to the sync
 notification messages on DistroSeries:+localpackagediffs and siblings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2049
2049
        notifications = view.request.response.notifications
2050
2050
        self.assertEqual(1, len(notifications))
2051
2051
        self.assertIn(
2052
 
            "<p>Requested sync of 1 package.</p>",
 
2052
            "Requested sync of 1 package.",
2053
2053
            notifications[0].message)
2054
2054
        # 302 is a redirect back to the same page.
2055
2055
        self.assertEqual(302, view.request.response.getStatus())
2271
2271
 
2272
2272
    def test_zero_packages(self):
2273
2273
        self.assertEqual(
2274
 
            "<p>Requested sync of 0 packages.</p><p>Please allow "
2275
 
            "some time for these to be processed.</p>",
 
2274
            "Requested sync of 0 packages.",
2276
2275
            copy_asynchronously_message(0).escapedtext)
2277
2276
 
2278
2277
    def test_one_package(self):
2279
2278
        self.assertEqual(
2280
 
            "<p>Requested sync of 1 package.</p><p>Please allow "
2281
 
            "some time for these to be processed.</p>",
 
2279
            "Requested sync of 1 package.<br />Please "
 
2280
            "allow some time for this to be processed.",
2282
2281
            copy_asynchronously_message(1).escapedtext)
2283
2282
 
2284
2283
    def test_multiple_packages(self):
2285
2284
        self.assertEqual(
2286
 
            "<p>Requested sync of 5 packages.</p><p>Please allow "
2287
 
            "some time for these to be processed.</p>",
 
2285
            "Requested sync of 5 packages.<br />Please "
 
2286
            "allow some time for these to be processed.",
2288
2287
            copy_asynchronously_message(5).escapedtext)
2289
2288
 
2290
2289