]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
style fix: wrap or ignore long lines in remaining tests 2237/head
authorPierce Lopez <pierce.lopez@gmail.com>
Wed, 3 Jan 2018 05:20:33 +0000 (00:20 -0500)
committerPierce Lopez <pierce.lopez@gmail.com>
Wed, 3 Jan 2018 05:20:33 +0000 (00:20 -0500)
tornado/test/auth_test.py
tornado/test/escape_test.py
tornado/test/gen_test.py
tornado/test/httpserver_test.py
tornado/test/httputil_test.py
tornado/test/iostream_test.py
tornado/test/locale_test.py
tornado/test/log_test.py
tornado/test/netutil_test.py
tornado/test/routing_test.py

index 400fc4f4582454d0b168422a27071ccbfe53a721..d79c365a8d0be814b3b1f738fbadbf5991e1faba 100644 (file)
@@ -5,7 +5,11 @@
 
 
 from __future__ import absolute_import, division, print_function
-from tornado.auth import OpenIdMixin, OAuthMixin, OAuth2Mixin, TwitterMixin, AuthError, GoogleOAuth2Mixin, FacebookGraphMixin
+
+from tornado.auth import (
+    AuthError, OpenIdMixin, OAuthMixin, OAuth2Mixin,
+    GoogleOAuth2Mixin, FacebookGraphMixin, TwitterMixin,
+)
 from tornado.concurrent import Future
 from tornado.escape import json_decode
 from tornado import gen
@@ -294,10 +298,14 @@ class AuthTest(AsyncHTTPTestCase):
                 ('/facebook/client/login', FacebookClientLoginHandler, dict(test=self)),
 
                 ('/twitter/client/login', TwitterClientLoginHandler, dict(test=self)),
-                ('/twitter/client/login_gen_engine', TwitterClientLoginGenEngineHandler, dict(test=self)),
-                ('/twitter/client/login_gen_coroutine', TwitterClientLoginGenCoroutineHandler, dict(test=self)),
-                ('/twitter/client/show_user', TwitterClientShowUserHandler, dict(test=self)),
-                ('/twitter/client/show_user_future', TwitterClientShowUserFutureHandler, dict(test=self)),
+                ('/twitter/client/login_gen_engine',
+                 TwitterClientLoginGenEngineHandler, dict(test=self)),
+                ('/twitter/client/login_gen_coroutine',
+                 TwitterClientLoginGenCoroutineHandler, dict(test=self)),
+                ('/twitter/client/show_user',
+                 TwitterClientShowUserHandler, dict(test=self)),
+                ('/twitter/client/show_user_future',
+                 TwitterClientShowUserFutureHandler, dict(test=self)),
 
                 # simulated servers
                 ('/openid/server/authenticate', OpenIdServerAuthenticateHandler),
@@ -308,7 +316,8 @@ class AuthTest(AsyncHTTPTestCase):
                 ('/facebook/server/me', FacebookServerMeHandler),
                 ('/twitter/server/access_token', TwitterServerAccessTokenHandler),
                 (r'/twitter/api/users/show/(.*)\.json', TwitterServerShowUserHandler),
-                (r'/twitter/api/account/verify_credentials\.json', TwitterServerVerifyCredentialsHandler),
+                (r'/twitter/api/account/verify_credentials\.json',
+                 TwitterServerVerifyCredentialsHandler),
             ],
             http_client=self.http_client,
             twitter_consumer_key='test_twitter_consumer_key',
@@ -323,7 +332,10 @@ class AuthTest(AsyncHTTPTestCase):
             '/openid/server/authenticate?' in response.headers['Location'])
 
     def test_openid_get_user(self):
-        response = self.fetch('/openid/client/login?openid.mode=blah&openid.ns.ax=http://openid.net/srv/ax/1.0&openid.ax.type.email=http://axschema.org/contact/email&openid.ax.value.email=foo@example.com')
+        response = self.fetch('/openid/client/login?openid.mode=blah'
+                              '&openid.ns.ax=http://openid.net/srv/ax/1.0'
+                              '&openid.ax.type.email=http://axschema.org/contact/email'
+                              '&openid.ax.value.email=foo@example.com')
         response.rethrow()
         parsed = json_decode(response.body)
         self.assertEqual(parsed["email"], "foo@example.com")
index 5ae75d002ab142efdb07bfc07ccad7ea4d3368d5..70aa4bdd6ac80693f801fc49bf3a2d04c22f44f7 100644 (file)
@@ -4,7 +4,10 @@
 from __future__ import absolute_import, division, print_function
 import tornado.escape
 
-from tornado.escape import utf8, xhtml_escape, xhtml_unescape, url_escape, url_unescape, to_unicode, json_decode, json_encode, squeeze, recursive_unicode
+from tornado.escape import (
+    utf8, xhtml_escape, xhtml_unescape, url_escape, url_unescape,
+    to_unicode, json_decode, json_encode, squeeze, recursive_unicode,
+)
 from tornado.util import unicode_type
 from tornado.test.util import unittest
 
@@ -15,18 +18,18 @@ linkify_tests = [
      u'hello <a href="http://world.com/">http://world.com/</a>!'),
 
     ("hello http://world.com/with?param=true&stuff=yes", {},
-     u'hello <a href="http://world.com/with?param=true&amp;stuff=yes">http://world.com/with?param=true&amp;stuff=yes</a>'),
+     u'hello <a href="http://world.com/with?param=true&amp;stuff=yes">http://world.com/with?param=true&amp;stuff=yes</a>'),  # noqa: E501
 
     # an opened paren followed by many chars killed Gruber's regex
     ("http://url.com/w(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", {},
-     u'<a href="http://url.com/w">http://url.com/w</a>(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
+     u'<a href="http://url.com/w">http://url.com/w</a>(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),  # noqa: E501
 
     # as did too many dots at the end
     ("http://url.com/withmany.......................................", {},
-     u'<a href="http://url.com/withmany">http://url.com/withmany</a>.......................................'),
+     u'<a href="http://url.com/withmany">http://url.com/withmany</a>.......................................'),  # noqa: E501
 
     ("http://url.com/withmany((((((((((((((((((((((((((((((((((a)", {},
-     u'<a href="http://url.com/withmany">http://url.com/withmany</a>((((((((((((((((((((((((((((((((((a)'),
+     u'<a href="http://url.com/withmany">http://url.com/withmany</a>((((((((((((((((((((((((((((((((((a)'),  # noqa: E501
 
     # some examples from http://daringfireball.net/2009/11/liberal_regex_for_matching_urls
     # plus a fex extras (such as multiple parentheses).
@@ -43,10 +46,10 @@ linkify_tests = [
      u'<a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>'),
 
     ("http://foo.com/blah_(blah)_(wikipedia)_blah", {},
-     u'<a href="http://foo.com/blah_(blah)_(wikipedia)_blah">http://foo.com/blah_(blah)_(wikipedia)_blah</a>'),
+     u'<a href="http://foo.com/blah_(blah)_(wikipedia)_blah">http://foo.com/blah_(blah)_(wikipedia)_blah</a>'),  # noqa: E501
 
     ("(Something like http://foo.com/blah_blah_(wikipedia))", {},
-     u'(Something like <a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>)'),
+     u'(Something like <a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>)'),  # noqa: E501
 
     ("http://foo.com/blah_blah.", {},
      u'<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>.'),
@@ -75,7 +78,7 @@ linkify_tests = [
      u'<a href="rdar:/1234">rdar:/1234</a>'),
 
     ("http://userid:password@example.com:8080", {},
-     u'<a href="http://userid:password@example.com:8080">http://userid:password@example.com:8080</a>'),
+     u'<a href="http://userid:password@example.com:8080">http://userid:password@example.com:8080</a>'),  # noqa: E501
 
     ("http://userid@example.com", {},
      u'<a href="http://userid@example.com">http://userid@example.com</a>'),
@@ -88,7 +91,8 @@ linkify_tests = [
 
     ("message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e",
      {"permitted_protocols": ["http", "message"]},
-     u'<a href="message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e">message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e</a>'),
+     u'<a href="message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e">'
+     u'message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e</a>'),
 
     (u"http://\u27a1.ws/\u4a39", {},
      u'<a href="http://\u27a1.ws/\u4a39">http://\u27a1.ws/\u4a39</a>'),
@@ -105,11 +109,13 @@ linkify_tests = [
 
     ("A http://reallylong.com/link/that/exceedsthelenglimit.html",
      {"require_protocol": True, "shorten": True},
-     u'A <a href="http://reallylong.com/link/that/exceedsthelenglimit.html" title="http://reallylong.com/link/that/exceedsthelenglimit.html">http://reallylong.com/link...</a>'),
+     u'A <a href="http://reallylong.com/link/that/exceedsthelenglimit.html"'
+     u' title="http://reallylong.com/link/that/exceedsthelenglimit.html">http://reallylong.com/link...</a>'),  # noqa: E501
 
     ("A http://reallylongdomainnamethatwillbetoolong.com/hi!",
      {"shorten": True},
-     u'A <a href="http://reallylongdomainnamethatwillbetoolong.com/hi" title="http://reallylongdomainnamethatwillbetoolong.com/hi">http://reallylongdomainnametha...</a>!'),
+     u'A <a href="http://reallylongdomainnamethatwillbetoolong.com/hi"'
+     u' title="http://reallylongdomainnamethatwillbetoolong.com/hi">http://reallylongdomainnametha...</a>!'),  # noqa: E501
 
     ("A file:///passwords.txt and http://web.com link", {},
      u'A file:///passwords.txt and <a href="http://web.com">http://web.com</a> link'),
@@ -120,15 +126,16 @@ linkify_tests = [
 
     ("www.external-link.com",
      {"extra_params": 'rel="nofollow" class="external"'},
-     u'<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a>'),
+     u'<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a>'),  # noqa: E501
 
     ("www.external-link.com and www.internal-link.com/blogs extra",
-     {"extra_params": lambda href: 'class="internal"' if href.startswith("http://www.internal-link.com") else 'rel="nofollow" class="external"'},
-     u'<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a> and <a href="http://www.internal-link.com/blogs" class="internal">www.internal-link.com/blogs</a> extra'),
+     {"extra_params": lambda href: 'class="internal"' if href.startswith("http://www.internal-link.com") else 'rel="nofollow" class="external"'},  # noqa: E501
+     u'<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a>'            # noqa: E501
+     u' and <a href="http://www.internal-link.com/blogs" class="internal">www.internal-link.com/blogs</a> extra'),  # noqa: E501
 
     ("www.external-link.com",
      {"extra_params": lambda href: '    rel="nofollow" class="external"  '},
-     u'<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a>'),
+     u'<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a>'),  # noqa: E501
 ]
 
 
@@ -230,7 +237,8 @@ class EscapeTestCase(unittest.TestCase):
             self.assertRaises(UnicodeDecodeError, json_encode, b"\xe9")
 
     def test_squeeze(self):
-        self.assertEqual(squeeze(u'sequences     of    whitespace   chars'), u'sequences of whitespace chars')
+        self.assertEqual(squeeze(u'sequences     of    whitespace   chars'),
+                         u'sequences of whitespace chars')
 
     def test_recursive_unicode(self):
         tests = {
index 476035d0bb8ab462ab0f2faf8229b4d8e6c9a668..d19d9930be3577afe7137afbe0608616a0088b01 100644 (file)
@@ -16,7 +16,7 @@ from tornado.ioloop import IOLoop
 from tornado.log import app_log
 from tornado import stack_context
 from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, ExpectLog, gen_test
-from tornado.test.util import unittest, skipOnTravis, skipBefore33, skipBefore35, skipNotCPython, exec_test
+from tornado.test.util import unittest, skipOnTravis, skipBefore33, skipBefore35, skipNotCPython, exec_test  # noqa: E501
 from tornado.web import Application, RequestHandler, asynchronous, HTTPError
 
 from tornado import gen
index 3b0524940ab1627b59046d213dd960dd9054d939..aa9d831d712d7087fb037ffb6ab5fcb3f3cc3ee2 100644 (file)
@@ -2,19 +2,21 @@
 
 
 from __future__ import absolute_import, division, print_function
+
 from tornado import netutil
 from tornado.escape import json_decode, json_encode, utf8, _unicode, recursive_unicode, native_str
 from tornado import gen
 from tornado.http1connection import HTTP1Connection
 from tornado.httpserver import HTTPServer
-from tornado.httputil import HTTPHeaders, HTTPMessageDelegate, HTTPServerConnectionDelegate, ResponseStartLine
+from tornado.httputil import HTTPHeaders, HTTPMessageDelegate, HTTPServerConnectionDelegate, ResponseStartLine  # noqa: E501
 from tornado.iostream import IOStream
 from tornado.log import gen_log
 from tornado.netutil import ssl_options_to_context
 from tornado.simple_httpclient import SimpleAsyncHTTPClient
-from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, ExpectLog, gen_test
+from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, ExpectLog, gen_test  # noqa: E501
 from tornado.test.util import unittest, skipOnTravis
 from tornado.web import Application, RequestHandler, asynchronous, stream_request_body
+
 from contextlib import closing
 import datetime
 import gzip
index 1521ca03eea97ef9d51233c9d61ab2ce5ae22685..8abb07a93cc2b1347b81287f422ad3372befc9cb 100644 (file)
@@ -3,8 +3,13 @@
 
 
 from __future__ import absolute_import, division, print_function
-from tornado.httputil import url_concat, parse_multipart_form_data, HTTPHeaders, format_timestamp, HTTPServerRequest, parse_request_start_line, parse_cookie, qs_to_qsl, PY3
+
+from tornado.httputil import (
+    url_concat, parse_multipart_form_data, HTTPHeaders, format_timestamp,
+    HTTPServerRequest, parse_request_start_line, parse_cookie, qs_to_qsl,
+)
 from tornado.escape import utf8, native_str
+from tornado.util import PY3
 from tornado.log import gen_log
 from tornado.testing import ExpectLog
 from tornado.test.util import unittest
@@ -443,7 +448,8 @@ class ParseCookieTest(unittest.TestCase):
         """
         Test cases copied from Python's Lib/test/test_http_cookies.py
         """
-        self.assertEqual(parse_cookie('chips=ahoy; vienna=finger'), {'chips': 'ahoy', 'vienna': 'finger'})
+        self.assertEqual(parse_cookie('chips=ahoy; vienna=finger'),
+                         {'chips': 'ahoy', 'vienna': 'finger'})
         # Here parse_cookie() differs from Python's cookie parsing in that it
         # treats all semicolons as delimiters, even within quotes.
         self.assertEqual(
@@ -455,11 +461,13 @@ class ParseCookieTest(unittest.TestCase):
         # Cookies with ':' character in their name.
         self.assertEqual(parse_cookie('key:term=value:term'), {'key:term': 'value:term'})
         # Cookies with '[' and ']'.
-        self.assertEqual(parse_cookie('a=b; c=[; d=r; f=h'), {'a': 'b', 'c': '[', 'd': 'r', 'f': 'h'})
+        self.assertEqual(parse_cookie('a=b; c=[; d=r; f=h'),
+                         {'a': 'b', 'c': '[', 'd': 'r', 'f': 'h'})
 
     def test_cookie_edgecases(self):
         # Cookies that RFC6265 allows.
-        self.assertEqual(parse_cookie('a=b; Domain=example.com'), {'a': 'b', 'Domain': 'example.com'})
+        self.assertEqual(parse_cookie('a=b; Domain=example.com'),
+                         {'a': 'b', 'Domain': 'example.com'})
         # parse_cookie() has historically kept only the last cookie with the
         # same name.
         self.assertEqual(parse_cookie('a=b; h=i; a=c'), {'a': 'c', 'h': 'i'})
@@ -471,15 +479,18 @@ class ParseCookieTest(unittest.TestCase):
         """
         # Chunks without an equals sign appear as unnamed values per
         # https://bugzilla.mozilla.org/show_bug.cgi?id=169091
-        self.assertIn('django_language', parse_cookie('abc=def; unnamed; django_language=en').keys())
+        self.assertIn('django_language',
+                      parse_cookie('abc=def; unnamed; django_language=en').keys())
         # Even a double quote may be an unamed value.
         self.assertEqual(parse_cookie('a=b; "; c=d'), {'a': 'b', '': '"', 'c': 'd'})
         # Spaces in names and values, and an equals sign in values.
         self.assertEqual(parse_cookie('a b c=d e = f; gh=i'), {'a b c': 'd e = f', 'gh': 'i'})
         # More characters the spec forbids.
-        self.assertEqual(parse_cookie('a   b,c<>@:/[]?{}=d  "  =e,f g'), {'a   b,c<>@:/[]?{}': 'd  "  =e,f g'})
+        self.assertEqual(parse_cookie('a   b,c<>@:/[]?{}=d  "  =e,f g'),
+                         {'a   b,c<>@:/[]?{}': 'd  "  =e,f g'})
         # Unicode characters. The spec only allows ASCII.
-        self.assertEqual(parse_cookie('saint=André Bessette'), {'saint': native_str('André Bessette')})
+        self.assertEqual(parse_cookie('saint=André Bessette'),
+                         {'saint': native_str('André Bessette')})
         # Browsers don't send extra whitespace or semicolons in Cookie headers,
         # but parse_cookie() should parse whitespace the same way
         # document.cookie parses whitespace.
index 8aef352081efeb3bc8649717899234edb1357d16..bdc5ee14f957dcd89f7838a21bf76260f0b327aa 100644 (file)
@@ -8,7 +8,7 @@ from tornado.log import gen_log, app_log
 from tornado.netutil import ssl_wrap_socket
 from tornado.stack_context import NullContext
 from tornado.tcpserver import TCPServer
-from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, bind_unused_port, ExpectLog, gen_test
+from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, bind_unused_port, ExpectLog, gen_test  # noqa: E501
 from tornado.test.util import unittest, skipIfNonUnix, refusing_port, skipPypy3V58
 from tornado.web import RequestHandler, Application
 import errno
index d548ffb861b2978319b5b476b1a701da5a35fc37..7f8d94626731299ee5215974cb0108c5b63f9ddf 100644 (file)
@@ -89,16 +89,17 @@ class EnglishTest(unittest.TestCase):
         self.assertEqual(locale.format_date(date, full_format=True),
                          'April 28, 2013 at 6:35 pm')
 
-        self.assertEqual(locale.format_date(datetime.datetime.utcnow() - datetime.timedelta(seconds=2), full_format=False),
+        now = datetime.datetime.utcnow()
+
+        self.assertEqual(locale.format_date(now - datetime.timedelta(seconds=2), full_format=False),
                          '2 seconds ago')
-        self.assertEqual(locale.format_date(datetime.datetime.utcnow() - datetime.timedelta(minutes=2), full_format=False),
+        self.assertEqual(locale.format_date(now - datetime.timedelta(minutes=2), full_format=False),
                          '2 minutes ago')
-        self.assertEqual(locale.format_date(datetime.datetime.utcnow() - datetime.timedelta(hours=2), full_format=False),
+        self.assertEqual(locale.format_date(now - datetime.timedelta(hours=2), full_format=False),
                          '2 hours ago')
 
-        now = datetime.datetime.utcnow()
-        self.assertEqual(locale.format_date(now - datetime.timedelta(days=1), full_format=False, shorter=True),
-                         'yesterday')
+        self.assertEqual(locale.format_date(now - datetime.timedelta(days=1),
+                                            full_format=False, shorter=True), 'yesterday')
 
         date = now - datetime.timedelta(days=2)
         self.assertEqual(locale.format_date(date, full_format=False, shorter=True),
index 888964e7b018c1e617a787a75b73d49b432518f5..0565d5668598c1bd7641efb3b7c6dd4d3f11cc52 100644 (file)
@@ -42,7 +42,8 @@ def ignore_bytes_warning():
 class LogFormatterTest(unittest.TestCase):
     # Matches the output of a single logging call (which may be multiple lines
     # if a traceback was included, so we use the DOTALL option)
-    LINE_RE = re.compile(b"(?s)\x01\\[E [0-9]{6} [0-9]{2}:[0-9]{2}:[0-9]{2} log_test:[0-9]+\\]\x02 (.*)")
+    LINE_RE = re.compile(
+        b"(?s)\x01\\[E [0-9]{6} [0-9]{2}:[0-9]{2}:[0-9]{2} log_test:[0-9]+\\]\x02 (.*)")
 
     def setUp(self):
         self.formatter = LogFormatter(color=False)
index fd284dad67bc5e91a5ee7e05c65f1ad22b97e2e6..00fc6eaf46a8a4bcf380ebfc1e326f9b4b7689bb 100644 (file)
@@ -8,7 +8,9 @@ from subprocess import Popen
 import sys
 import time
 
-from tornado.netutil import BlockingResolver, OverrideResolver, ThreadedResolver, is_valid_ip, bind_sockets
+from tornado.netutil import (
+    BlockingResolver, OverrideResolver, ThreadedResolver, is_valid_ip, bind_sockets
+)
 from tornado.stack_context import ExceptionStackContext
 from tornado.testing import AsyncTestCase, gen_test, bind_unused_port
 from tornado.test.util import unittest, skipIfNoNetwork
index 846f348de965ff7413af923142537b789a0ffbc4..ca097eb8e2613c16163d204942eae3a7044b9488 100644 (file)
@@ -13,7 +13,7 @@
 
 from __future__ import absolute_import, division, print_function
 
-from tornado.httputil import HTTPHeaders, HTTPMessageDelegate, HTTPServerConnectionDelegate, ResponseStartLine
+from tornado.httputil import HTTPHeaders, HTTPMessageDelegate, HTTPServerConnectionDelegate, ResponseStartLine  # noqa: E501
 from tornado.routing import HostMatches, PathMatches, ReversibleRouter, Router, Rule, RuleRouter
 from tornado.testing import AsyncHTTPTestCase
 from tornado.web import Application, HTTPError, RequestHandler
@@ -29,7 +29,9 @@ class BasicRouter(Router):
 
             def finish(self):
                 self.connection.write_headers(
-                    ResponseStartLine("HTTP/1.1", 200, "OK"), HTTPHeaders({"Content-Length": "2"}), b"OK"
+                    ResponseStartLine("HTTP/1.1", 200, "OK"),
+                    HTTPHeaders({"Content-Length": "2"}),
+                    b"OK"
                 )
                 self.connection.finish()
 
@@ -179,7 +181,8 @@ class RuleRouterTest(AsyncHTTPTestCase):
 
         app.add_handlers(".*", [
             (HostMatches("www.example.com"), [
-                (PathMatches("/first_handler"), "tornado.test.routing_test.SecondHandler", {}, "second_handler")
+                (PathMatches("/first_handler"),
+                 "tornado.test.routing_test.SecondHandler", {}, "second_handler")
             ]),
             Rule(PathMatches("/.*handler"), router),
             Rule(PathMatches("/first_handler"), FirstHandler, name="first_handler"),