<s> from tornado . web import Application , RequestHandler <EOL> from tornadotools . route import Route <EOL> from pyvows import Vows , expect <EOL> from tornado_pyvows . context import TornadoContext , TornadoSubContext <EOL> @ Route ( r"<STR_LIT>" ) <EOL> class TestHandler1 ( RequestHandler ) : <EOL> def get ( self ) : <EOL> self . finish ( "<STR_LIT>" ) <EOL> @ Route ( r"<STR_LIT>" , name = "<STR_LIT>" ) <EOL> class TestHandler2 ( RequestHandler ) : <EOL> def get ( self ) : <EOL> self . finish ( "<STR_LIT>" ) <EOL> @ Vows . batch <EOL> class RoutingDecorator ( TornadoContext ) : <EOL> def _get_app ( self ) : <EOL> return Application ( Route . routes ( ) ) <EOL> class RootBody ( TornadoSubContext ) : <EOL> def topic ( self ) : <EOL> return self . _get ( "<STR_LIT:/>" ) <EOL> def shouldNotBeFound ( self , topic ) : <EOL> expect ( topic . code ) . to_equal ( <NUM_LIT> ) <EOL> class Handler1 ( TornadoSubContext ) : <EOL> def topic ( self ) : <EOL> return self . _get ( "<STR_LIT>" ) <EOL> def shouldNotBeAnError ( self , topic ) : <EOL> expect ( topic ) . not_to_be_an_error ( ) <EOL> def hasHttpCode200 ( self , topic ) : <EOL> expect ( topic . code ) . to_equal ( <NUM_LIT:200> ) <EOL> def bodyShouldMatch ( self , topic ) : <EOL> expect ( topic . body ) . to_equal ( "<STR_LIT>" ) <EOL> class Handler2 ( Handler1 ) : <EOL> def topic ( self ) : <EOL> return self . _get ( "<STR_LIT>" ) <EOL> def bodyShouldMatch ( self , topic ) : <EOL> expect ( topic . body ) . to_equal ( "<STR_LIT>" ) </s>
