<s> try : <EOL> import unittest2 as unittest <EOL> except ImportError : <EOL> import unittest <EOL> from isso import wsgi <EOL> class TestWSGIUtilities ( unittest . TestCase ) : <EOL> def test_urlsplit ( self ) : <EOL> examples = [ <EOL> ( "<STR_LIT>" , ( '<STR_LIT>' , <NUM_LIT> , False ) ) , <EOL> ( "<STR_LIT>" , ( '<STR_LIT>' , <NUM_LIT> , True ) ) , <EOL> ( "<STR_LIT>" , ( '<STR_LIT>' , <NUM_LIT> , False ) ) , <EOL> ( "<STR_LIT>" , ( '<STR_LIT>' , <NUM_LIT> , False ) ) , <EOL> ( "<STR_LIT>" , ( '<STR_LIT>' , <NUM_LIT> , True ) ) ] <EOL> for ( hostname , result ) in examples : <EOL> self . assertEqual ( wsgi . urlsplit ( hostname ) , result ) <EOL> def test_urljoin ( self ) : <EOL> examples = [ <EOL> ( ( "<STR_LIT>" , <NUM_LIT> , False ) , "<STR_LIT>" ) , <EOL> ( ( "<STR_LIT>" , <NUM_LIT> , True ) , "<STR_LIT>" ) , <EOL> ( ( "<STR_LIT>" , <NUM_LIT> , True ) , "<STR_LIT>" ) ] <EOL> for ( split , result ) in examples : <EOL> self . assertEqual ( wsgi . urljoin ( * split ) , result ) <EOL> def test_origin ( self ) : <EOL> self . assertEqual ( wsgi . origin ( [ ] ) ( { } ) , "<STR_LIT>" ) <EOL> origin = wsgi . origin ( [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> self . assertEqual ( origin ( { "<STR_LIT>" : "<STR_LIT>" } ) , <EOL> "<STR_LIT>" ) <EOL> self . assertEqual ( origin ( { "<STR_LIT>" : "<STR_LIT>" } ) , <EOL> "<STR_LIT>" ) <EOL> self . assertEqual ( origin ( { "<STR_LIT>" : "<STR_LIT>" } ) , <EOL> "<STR_LIT>" ) <EOL> self . assertEqual ( origin ( { "<STR_LIT>" : "<STR_LIT>" } ) , <EOL> "<STR_LIT>" ) <EOL> self . assertEqual ( origin ( { } ) , "<STR_LIT>" ) </s>
