<s> from appkit . api . v0_2_4 . app import * <EOL> import os <EOL> import unittest <EOL> class AppKitUnitTest ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> app = App ( __file__ ) <EOL> @ app . route ( '<STR_LIT>' ) <EOL> def index ( ) : <EOL> return '''<STR_LIT>''' <EOL> @ app . route ( '<STR_LIT>' ) <EOL> def hi ( ) : <EOL> return '<STR_LIT>' <EOL> @ app . route ( '<STR_LIT>' ) <EOL> def sum ( arg1 , arg2 ) : <EOL> return int ( arg1 ) + int ( arg2 ) <EOL> self . app = app <EOL> def test_init_gtk ( self ) : <EOL> try : <EOL> Gtk . init ( '<STR_LIT>' ) <EOL> except : <EOL> raise Exception ( '<STR_LIT>' ) <EOL> def test___init__ ( self ) : <EOL> self . assertIsInstance ( self . app . window , Gtk . Window ) <EOL> self . assertIsInstance ( self . app . webkit_web_view , WebKit . WebView ) <EOL> self . assertIsInstance ( self . app . webkit_main_frame , WebKit . WebFrame ) <EOL> self . assertTrue ( os . path . isdir ( self . app . app_dir ) ) <EOL> def test_route ( self ) : <EOL> self . assertEqual ( self . app . url_pattern . keys ( ) [ <NUM_LIT:0> ] , '<STR_LIT>' ) <EOL> self . assertTrue ( hasattr ( self . app . url_pattern [ '<STR_LIT>' ] , '<STR_LIT>' ) ) <EOL> def test__url_map_to_function ( self ) : <EOL> self . assertEqual ( self . app . _url_map_to_function ( '<STR_LIT>' ) , '<STR_LIT>' ) <EOL> self . assertEqual ( self . app . _url_map_to_function ( '<STR_LIT>' ) , <NUM_LIT:3> ) <EOL> def test__init_ui ( self ) : <EOL> self . app . _init_ui ( ) <EOL> self . assertEqual ( self . app . window . get_title ( ) , '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
