| OLD | NEW |
| 1 # Copyright (C) 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2012 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 def test_static_content_or_function_switch(self): | 92 def test_static_content_or_function_switch(self): |
| 93 self.assert_handler_response(["/test.js"], set(["test.js"]), set(), set(
)) | 93 self.assert_handler_response(["/test.js"], set(["test.js"]), set(), set(
)) |
| 94 self.assert_handler_response(["/test.js", "/test.css", "/test.html"], | 94 self.assert_handler_response(["/test.js", "/test.css", "/test.html"], |
| 95 set(["test.js", "test.html", "test.css"]),
set(), set()) | 95 set(["test.js", "test.html", "test.css"]),
set(), set()) |
| 96 self.assert_handler_response(["/test.js", "/test.exe", "/testhtml"], set
(["test.js"]), set([404]), set()) | 96 self.assert_handler_response(["/test.js", "/test.exe", "/testhtml"], set
(["test.js"]), set([404]), set()) |
| 97 self.assert_handler_response(["/test.html", "/function.one"], set(["test
.html"]), set(), set(['function_one'])) | 97 self.assert_handler_response(["/test.html", "/function.one"], set(["test
.html"]), set(), set(['function_one'])) |
| 98 self.assert_handler_response(["/some.html"], set(["some.html"]), set(),
set()) | 98 self.assert_handler_response(["/some.html"], set(["some.html"]), set(),
set()) |
| 99 | 99 |
| 100 def test_svn_log_non_ascii(self): | 100 def test_svn_log_non_ascii(self): |
| 101 xmlChangelog = u'<?xml version="1.0"?>\n<log>\n<logentry revision="1">\n
<msg>Patch from John Do\xe9.</msg>\n</logentry>\n</log>' | 101 xml_change_log = (u'<?xml version="1.0"?>\n<log>\n<logentry revision="1"
>\n' |
| 102 u'<msg>Patch from John Do\xe9.</msg>\n</logentry>\n</l
og>') |
| 102 handler = TestReflectionHandlerServeXML() | 103 handler = TestReflectionHandlerServeXML() |
| 103 handler.serve_xml(xmlChangelog) | 104 handler.serve_xml(xml_change_log) |
| 104 self.assertEqual(handler.wfile.data, xmlChangelog.encode('utf-8')) | 105 self.assertEqual(handler.wfile.data, xml_change_log.encode('utf-8')) |
| OLD | NEW |