<s> from circuits . web import Controller <EOL> from . helpers import urlopen <EOL> class Root ( Controller ) : <EOL> def index ( self ) : <EOL> return "<STR_LIT>" <EOL> def foo ( self ) : <EOL> self . response . headers [ "<STR_LIT:Content-Type>" ] = "<STR_LIT>" <EOL> return "<STR_LIT>" <EOL> def empty ( self ) : <EOL> return "<STR_LIT>" <EOL> def test_default ( webapp ) : <EOL> f = urlopen ( webapp . server . http . base ) <EOL> s = f . read ( ) <EOL> assert s == b"<STR_LIT>" <EOL> content_type = f . headers [ "<STR_LIT:Content-Type>" ] <EOL> assert content_type == "<STR_LIT>" <EOL> def test_explicit ( webapp ) : <EOL> f = urlopen ( "<STR_LIT>" . format ( webapp . server . http . base ) ) <EOL> s = f . read ( ) <EOL> assert s == b"<STR_LIT>" <EOL> content_type = f . headers [ "<STR_LIT:Content-Type>" ] <EOL> assert content_type == "<STR_LIT>" <EOL> def test_static ( webapp ) : <EOL> f = urlopen ( "<STR_LIT>" . format ( webapp . server . http . base ) ) <EOL> s = f . read ( ) <EOL> assert s == b"<STR_LIT>" <EOL> content_type = f . headers [ "<STR_LIT:Content-Type>" ] <EOL> assert content_type == "<STR_LIT>" <EOL> def test_empty ( webapp ) : <EOL> f = urlopen ( "<STR_LIT>" . format ( webapp . server . http . base ) ) <EOL> s = f . read ( ) <EOL> assert s == b"<STR_LIT>" <EOL> content_length = f . headers [ "<STR_LIT>" ] <EOL> assert int ( content_length ) == <NUM_LIT:0> </s>
