Rev 196: Updated expected output in pqm.ui.tests.test_twisted.TestTwistedUI.testProjectSpecificPage. in http://bzr.daniel-watkins.co.uk/pqm/ui

Daniel Watkins daniel at daniel-watkins.co.uk
Thu Jul 10 13:26:29 BST 2008


At http://bzr.daniel-watkins.co.uk/pqm/ui

------------------------------------------------------------
revno: 196
revision-id: daniel at daniel-watkins.co.uk-20080710122516-u5tbwpusa2ma5cvs
parent: daniel at daniel-watkins.co.uk-20080710121622-prife5d9v2az1d51
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: ui
timestamp: Thu 2008-07-10 13:25:16 +0100
message:
  Updated expected output in pqm.ui.tests.test_twisted.TestTwistedUI.testProjectSpecificPage.
-------------- next part --------------
=== modified file 'pqm/ui/tests/test_twisted.py'
--- a/pqm/ui/tests/test_twisted.py	2008-07-10 12:16:22 +0000
+++ b/pqm/ui/tests/test_twisted.py	2008-07-10 12:25:16 +0000
@@ -135,25 +135,57 @@
         queue = self.getResource()
         request = DummyRequest(['project', ''])
         result_resource = getChildForRequest(queue, request)
-        html = result_resource.render(request)
-        expected = (
-"<h1>PQM Queue: 3 scripts</h1>"
-"<p>Current time: ...</p>"
-"<h2>Now playing...</h2>"
-"<pre>"
-"&lt;foo\n"
-"bar\n"
-"baz\n"
-"quux\n"
-"theta\n"
-"</pre>"
-"<ul>"
-"<li><p>...: John.Citizen at example.com, 'A new action' "
-"<ol><li>Merge archive at example.com/foo--bar--0 archive2 at example.com/bar--foo--1</li></ol></p></li>"
-"</ul>"
-"<h2>Coming up</h2>"
-"<ol>"
-"<li><p>...: John.Citizen at example.com, Request for non-PQM managed branch.</p></li>"
-"<li><p>1 request(s) for other project(s).</p></li>"
-"</ol>")
+        html = BeautifulSoup(result_resource.render(request)).prettify()
+        expected = ("<html>\n"
+                    " <head>\n"
+                    "  <title>\n"
+                    "   Patch Queue Manager\n"
+                    "  </title>\n"
+                    " </head>\n"
+                    " <body>\n"
+                    "  <h1>\n"
+                    "   PQM Queue: 3 scripts\n"
+                    "  </h1>\n"
+                    "  <p>\n"
+                    "   Current time: ...\n"
+                    "  </p>\n"
+                    "  <h2>\n"
+                    "   Now playing...\n"
+                    "  </h2>\n"
+                    "  <pre>\n"
+                    "   &lt;foo\n"
+                    "bar\n"
+                    "baz\n"
+                    "quux\n"
+                    "theta\n"
+                    "  </pre>\n"
+                    "  <ul>\n"
+                    "   <li>\n"
+                    "    <p>\n"
+                    "     ...: John.Citizen at example.com, 'A new action'\n"
+                    "     <ol>\n"
+                    "      <li>\n"
+                    "       Merge archive at example.com/foo--bar--0 archive2 at example.com/bar--foo--1\n"
+                    "      </li>\n"
+                    "     </ol>\n"
+                    "    </p>\n"
+                    "   </li>\n"
+                    "  </ul>\n"
+                    "  <h2>\n"
+                    "   Coming up\n"
+                    "  </h2>\n"
+                    "  <ol>\n"
+                    "   <li>\n"
+                    "    <p>\n"
+                    "     ...: John.Citizen at example.com, Request for non-PQM managed branch.\n"
+                    "    </p>\n"
+                    "   </li>\n"
+                    "   <li>\n"
+                    "    <p>\n"
+                    "     A request for another project.\n"
+                    "    </p>\n"
+                    "   </li>\n"
+                    "  </ol>\n"
+                    " </body>\n"
+                    "</html>")
         self.assertDocTest(expected, html)



More information about the bazaar-commits mailing list