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

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


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

------------------------------------------------------------
revno: 195
revision-id: daniel at daniel-watkins.co.uk-20080710121622-prife5d9v2az1d51
parent: daniel at daniel-watkins.co.uk-20080710121458-dnmunn1cr281vbp0
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: ui
timestamp: Thu 2008-07-10 13:16:22 +0100
message:
  Updated expected output in pqm.ui.tests.test_twisted.TestTwistedUI.testSlash.
-------------- next part --------------
=== modified file 'pqm/ui/tests/test_twisted.py'
--- a/pqm/ui/tests/test_twisted.py	2008-07-10 12:14:58 +0000
+++ b/pqm/ui/tests/test_twisted.py	2008-07-10 12:16:22 +0000
@@ -6,6 +6,8 @@
 import shutil
 import logging
 
+from BeautifulSoup import BeautifulSoup
+
 import pqm
 from pqm.tests.test_pqm import QueueSetup
 
@@ -70,20 +72,53 @@
         queue = self.getResource()
         request = DummyRequest([''])
         result_resource = getChildForRequest(queue, request)
-        html = result_resource.render(request)
+        html = BeautifulSoup(result_resource.render(request)).prettify()
         expected = (
-"<h1>PQM Queue: 3 scripts</h1>"
-"<p>Current time: ...</p>"
-"<h2>Now playing...</h2>"
-"<ul>"
-"<li><p>1 request(s) for other project(s).</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>...: John.Citizen at example.com, 'A new action' "
-"<ol><li>Merge archive at example.com/foo--bar--0 archive2 at example.com/bar--foo--2</li></ol></p></li>"
-"</ol>")
+"<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"
+"  <ul>\n"
+"   <li>\n"
+"    <p>\n"
+"     A request for another project.\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"
+"     ...: 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--2\n"
+"      </li>\n"
+"     </ol>\n"
+"    </p>\n"
+"   </li>\n"
+"  </ol>\n"
+" </body>\n"
+"</html>")
         self.assertDocTest(expected, html)
 
     def testProjectSpecificPage(self):



More information about the bazaar-commits mailing list