<s> from circuits . web import expose , Controller <EOL> from . helpers import urlopen <EOL> class Root ( Controller ) : <EOL> @ expose ( "<STR_LIT>" ) <EOL> def index ( self ) : <EOL> return "<STR_LIT>" <EOL> class Leaf ( Controller ) : <EOL> channel = "<STR_LIT>" <EOL> @ expose ( "<STR_LIT>" ) <EOL> def index ( self , vpath = None ) : <EOL> if vpath is None : <EOL> return "<STR_LIT>" <EOL> else : <EOL> return "<STR_LIT>" + vpath <EOL> def test ( webapp ) : <EOL> Leaf ( ) . register ( webapp ) <EOL> f = urlopen ( webapp . server . http . base + "<STR_LIT>" ) <EOL> s = f . read ( ) <EOL> assert s == b"<STR_LIT>" <EOL> f = urlopen ( webapp . server . http . base + "<STR_LIT>" ) <EOL> s = f . read ( ) <EOL> assert s == b"<STR_LIT>" </s>
