Module Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias alias Import alias Import alias ImportFrom alias alias alias Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults vararg body Assign AttributeStore NameLoad attr Call NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Slice Num ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Str Index AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Slice Num ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults vararg body Assign SubscriptStore AttributeLoad NameLoad attr Slice Num NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Slice Num ListLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str AttributeLoad SubscriptLoad NameLoad Index Num attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore ListLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Slice Num ListLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Slice Num ListLoad Call AttributeLoad Str attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Call NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Call NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad With Call NameLoad Str keyword Call NameLoad body With Call AttributeLoad NameLoad attr NameLoad Str body With Call NameLoad Str body With Call AttributeLoad NameLoad attr NameLoad Str body Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Slice Num ListLoad Str Str Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad With Call NameLoad Str body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr TupleLoad TupleLoad Str Dict AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad With Call NameLoad Str body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str With Call NameLoad Str body With Call NameLoad Str body Assign AttributeStore AttributeLoad NameLoad attr attr Lambda arguments args defaults Num Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad Num Num Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword Str keyword Str decorator_list decorator_list
N/A N/A sys N/A signal N/A os N/A logging N/A unittest wsgid.core.cli Cli wsgid.core parser WsgidApp validate_input_params _is_valid_socket wsgid.commands CommandInit wsgid.test fullpath FakeOptions N/A wsgid.conf N/A daemon mock patch Mock MagicMock N/A ROOT_PATH N/A fullpath __file__ N/A FIXTURES_PATH N/A N/A N/A os path join ROOT_PATH fixtures CliTest N/A N/A unittest TestCase N/A setUp N/A N/A self N/A args N/A N/A N/A self cli N/A Cli N/A N/A N/A sys argv N/A 1 N/A N/A N/A self fake_app_path N/A N/A N/A os path join N/A fullpath __file__ app-path N/A N/A N/A os system N/A N/A rm -rf {0} format N/A N/A N/A os path join N/A self fake_app_path pid/ N/A N/A N/A self cli options N/A N/A parser _parse_args N/A N/A N/A N/A self cli options app_path N/A self fake_app_path N/A N/A N/A N/A CommandInit run N/A FakeOptions app_path N/A self fake_app_path N/A N/A patch sys.stderr tearDown N/A N/A self N/A N/A N/A N/A N/A wsgid conf settings None N/A test_nodaemon N/A N/A self N/A N/A N/A opts N/A N/A self _parse N/A N/A N/A self assertTrue N/A opts N/A detach_process N/A test_daemon_keep_sigterm_handler N/A N/A self N/A N/A N/A opt N/A N/A self _parse N/A N/A N/A self assertTrue N/A opt N/A detach_process N/A handler N/A N/A signal getsignal N/A signal SIGTERM N/A N/A N/A self assertEquals N/A N/A opt N/A signal_map N/A N/A signal SIGTERM handler N/A test_nodaemon_keep_basic_fds N/A N/A self N/A N/A N/A 
        When not a daemon we must keep std{in, out, err}
         N/A opt N/A N/A self _parse --no-daemon N/A N/A N/A self assertFalse N/A opt N/A detach_process N/A N/A N/A self assertEquals N/A opt N/A stdin N/A sys stdin N/A N/A N/A self assertEquals N/A opt N/A stdout N/A sys stdout N/A N/A N/A self assertEquals N/A opt N/A stderr N/A sys stderr N/A test_no_chroot_if_no_app_path N/A N/A self N/A N/A N/A 
        If we choose to --chroot and --app-path is not passed, we should
        use the current working dir as the --app-path
         N/A N/A patch os.getcwd cwd N/A N/A N/A cwd return_value /tmp N/A opt N/A N/A self _parse --chroot N/A N/A N/A self assertEquals /tmp N/A opt N/A chroot_directory N/A test_no_chroot N/A N/A self N/A N/A N/A 
        We shoud not chroot if --chroot is not passed.
         N/A opt N/A N/A self _parse --app-path=./ N/A N/A N/A self assertFalse N/A N/A opt has_key chroot_directory N/A test_drop_priv N/A N/A self N/A N/A N/A 
        If we are chrooting we must drop privileges.
         N/A opt N/A N/A self _parse --app-path=./ --chroot N/A stat N/A N/A os stat ./ N/A N/A N/A self assertEquals N/A opt N/A uid N/A stat st_uid N/A N/A N/A self assertEquals N/A opt N/A gid N/A stat st_gid N/A test_chroot_has_absolute_app_path N/A N/A self N/A N/A N/A 
        chroot_diretocry should have the absolute path of --app-path
         N/A opt N/A N/A self _parse --chroot --app-path=./ N/A abspath N/A N/A N/A os path abspath N/A N/A os getcwd N/A N/A N/A self assertEquals N/A opt N/A chroot_directory abspath N/A test_parse_workers_as_integer N/A N/A self N/A N/A N/A N/A N/A sys argv N/A 1 N/A --workers=3 N/A opts N/A N/A parser _parse_args N/A N/A N/A self assertTrue N/A type int N/A opts workers N/A _parse N/A N/A self N/A opts N/A N/A N/A N/A sys argv N/A 1 opts N/A N/A N/A N/A self cli _create_daemon_options N/A N/A parser parse_options N/A test_ajust_log_path_app_path N/A N/A self N/A N/A N/A 
        We must generate all logs inside <app-path>/logs
         N/A app_path N/A N/A N/A os path join ../ N/A N/A N/A os path dirname __file__ app-path N/A N/A N/A sys argv N/A 1 N/A N/A --app-path=%s app_path N/A opt N/A N/A parser _parse_args N/A N/A N/A N/A self cli _set_loggers opt N/A handlers N/A N/A N/A self cli log handlers N/A N/A N/A self assertTrue N/A isinstance N/A handlers N/A 0 N/A logging FileHandler N/A N/A N/A self assertEquals N/A N/A N/A os path join app_path logs/wsgid.log N/A N/A handlers N/A 0 baseFilename N/A test_full_path_empty_path N/A N/A self N/A N/A N/A N/A N/A self assertEquals N/A N/A parser _full_path None None N/A test_should_droppriv_if_app_path_is_passed N/A N/A self N/A N/A N/A 
        Even if we do not chroot, we must drop priv.
         N/A app_path N/A N/A N/A os path join ../ N/A N/A N/A os path dirname __file__ app-path N/A argv N/A N/A --app-path=%s app_path N/A stat N/A N/A os stat N/A N/A parser _full_path app_path N/A opts N/A N/A self _parse argv N/A N/A N/A self assertEquals N/A opts N/A uid N/A stat st_uid N/A N/A N/A self assertEquals N/A opts N/A gid N/A stat st_gid N/A test_load_wsgid_json_file N/A N/A self N/A N/A N/A 
        If we have a wsgid.json file inside app-path, so we must use it.
         N/A app_path N/A N/A N/A os path join ../ N/A N/A N/A os path dirname __file__ app-path N/A N/A N/A sys argv N/A 1 N/A N/A --app-path=%s app_path N/A options N/A N/A parser parse_options N/A N/A N/A self assertEquals tcp://127.0.0.1:5000 N/A options recv N/A N/A N/A self assertEquals tcp://127.0.0.1:5001 N/A options send N/A N/A N/A self assertEquals 4 N/A options workers N/A N/A N/A self assertEquals True N/A options debug N/A N/A N/A self assertEquals True N/A options keep_alive N/A N/A N/A self assertEquals False N/A options chroot N/A N/A N/A self assertEquals True N/A options stdout N/A N/A N/A self assertEquals N/A ENV1 ENV2 VALUE1 VALUE2 N/A options envs N/A test_wsgid_json_overwrites_command_line N/A N/A self N/A N/A N/A app_path N/A N/A N/A os path join ../ N/A N/A N/A os path dirname __file__ app-path N/A N/A N/A sys argv N/A 1 N/A N/A N/A --app-path={0} format app_path --workers=8 N/A options N/A N/A parser parse_options N/A N/A N/A self assertEquals 4 N/A options workers N/A test_autocreate_pid_folder_structure N/A N/A self N/A N/A N/A N/A N/A os system N/A N/A rm -rf {0} format N/A N/A N/A os path join N/A self fake_app_path pid/ N/A pid_folder N/A N/A N/A os path join N/A self fake_app_path pid N/A master_pid_folder N/A N/A N/A os path join pid_folder master N/A worker_pid_folder N/A N/A N/A os path join pid_folder worker N/A master_pid_file N/A N/A N/A os path join master_pid_folder 42.pid N/A worker_pid_file N/A N/A N/A os path join worker_pid_folder 43.pid N/A N/A N/A self assertFalse N/A N/A N/A os path exists pid_folder N/A N/A N/A self assertFalse N/A N/A N/A os path exists master_pid_folder N/A N/A N/A self assertFalse N/A N/A N/A os path exists worker_pid_folder N/A N/A N/A N/A self cli _write_pid 42 N/A N/A self cli MASTER N/A N/A N/A N/A self cli _write_pid 43 N/A N/A self cli WORKER N/A N/A N/A self assertTrue N/A N/A N/A os path exists pid_folder N/A N/A N/A self assertTrue N/A N/A N/A os path exists master_pid_folder N/A N/A N/A self assertTrue N/A N/A N/A os path exists worker_pid_folder N/A N/A N/A self assertTrue N/A N/A N/A os path exists N/A N/A N/A os path join master_pid_folder 42.pid N/A N/A N/A self assertTrue N/A N/A N/A os path exists N/A N/A N/A os path join worker_pid_folder 43.pid N/A N/A N/A self assertEquals 42 N/A N/A N/A file master_pid_file read N/A N/A N/A self assertEquals 43 N/A N/A N/A file worker_pid_file read N/A test_remove_pid N/A N/A self N/A N/A N/A N/A N/A N/A self cli _write_pid 42 N/A N/A self cli MASTER N/A pid_file N/A N/A N/A os path join N/A self fake_app_path pid/master/42.pid N/A N/A N/A N/A self cli _remove_pid 42 N/A N/A self cli MASTER N/A N/A N/A self assertFalse N/A N/A N/A os path exists pid_file N/A test_start_workers_when_nodaemon N/A N/A self N/A args N/A N/A 
        Doing this wsgid is able to run with a process supervisor.
        See: issue/20 at github
         N/A path N/A N/A N/A os path join FIXTURES_PATH nodaemon-app N/A initcmd N/A CommandInit N/A N/A N/A initcmd run N/A FakeOptions app_path path N/A N/A patch daemon.DaemonContext new N/A MagicMock N/A N/A N/A N/A patch object Cli _create_worker N/A N/A N/A patch wsgid.core.cli.validate_input_params N/A N/A N/A N/A patch object Cli _wait_workers N/A N/A N/A N/A daemon DaemonContext __enter__ N/A Mock N/A N/A N/A daemon DaemonContext __exit__ N/A Mock N/A N/A N/A sys argv N/A 1 N/A --workers=3 --no-daemon N/A N/A --app-path={0} format path N/A cli N/A Cli N/A N/A N/A cli run N/A N/A N/A self assertEquals 3 N/A N/A cli _create_worker call_count N/A N/A N/A self assertEquals 1 N/A N/A cli _wait_workers call_count N/A N/A patch sys.stderr test_daemon_should_create_normal_logs N/A N/A self N/A N/A N/A 
        When using only --do-daemon (without --stdout) logs must be
        redirected to log file.
         N/A opts N/A FakeOptions app_path /some/path no_daemon True stdout False debug None chroot None N/A N/A patch logging.FileHandler N/A N/A cli N/A Cli N/A N/A N/A cli _set_loggers opts N/A N/A N/A self assertEquals 1 N/A N/A logging FileHandler call_count N/A N/A N/A self assertEquals N/A N/A /some/path/logs/wsgid.log N/A N/A N/A logging FileHandler call_args N/A test_create_log_for_stdout N/A N/A self N/A N/A N/A 
        When we pass --stdout all logs must be pointed to stdout.
         N/A opts N/A FakeOptions app_path /some/path no_daemon True stdout True debug None chroot None N/A N/A patch logging.StreamHandler N/A N/A cli N/A Cli N/A N/A N/A cli _set_loggers opts N/A N/A N/A self assertEquals 1 N/A N/A logging StreamHandler call_count N/A test_clean_pid_files_on_keyboard_interrupt N/A N/A self N/A args N/A N/A path N/A N/A N/A os path join FIXTURES_PATH clean-pids-app N/A initcmd N/A CommandInit N/A opts N/A FakeOptions app_path path N/A N/A N/A initcmd run opts N/A N/A open N/A N/A N/A os path join path pid/master/3340.pid w N/A N/A open N/A N/A N/A os path join path pid/worker/2736.pid w N/A N/A open N/A N/A N/A os path join path pid/worker/3847.pid w N/A N/A patch os.wait N/A N/A N/A patch os.getpid N/A N/A N/A N/A os getpid side_effect N/A N/A N/A N/A 3340 N/A N/A N/A os wait side_effect N/A KeyboardInterrupt N/A cli N/A Cli N/A N/A cli options opts N/A N/A cli log N/A Mock N/A N/A cli workers N/A 2736 3847 N/A N/A N/A cli _wait_workers N/A app N/A WsgidApp path N/A N/A N/A self assertEquals N/A N/A N/A app master_pids N/A N/A N/A self assertEquals N/A N/A N/A app worker_pids N/A N/A patch sys.stderr test_check_zmq_sockets N/A N/A self N/A N/A N/A N/A N/A self assertTrue N/A _is_valid_socket tcp://127.0.0.1:8080 N/A N/A N/A self assertTrue N/A _is_valid_socket tcp://*:8080 N/A N/A N/A self assertTrue N/A _is_valid_socket tcp://machine.intranet.org:8080 N/A N/A N/A self assertTrue N/A _is_valid_socket ipc:///tmp/sock N/A N/A N/A self assertTrue N/A _is_valid_socket inproc://#2 N/A N/A N/A self assertTrue N/A _is_valid_socket pgm:///tmp/sock N/A N/A N/A self assertFalse N/A _is_valid_socket tcp://127.0.0.1 N/A N/A N/A self assertFalse N/A _is_valid_socket tcp://127.0.0.1:abc N/A N/A N/A self assertFalse N/A _is_valid_socket invalid://127.0.0.1:abc N/A test_socket_validation N/A N/A self N/A N/A N/A N/A validate_input_params app_path /tmp send tcp://127.0.0.1:8800 recv ipc:///tmp/sock N/A N/A N/A self assertRaises Exception validate_input_params app_path /tmp send invalid://127.0.0.1:88 N/A N/A N/A self assertRaises Exception validate_input_params app_path /tmp recv tcp://127.0.0.1:89 N/A N/A N/A self assertRaises Exception validate_input_params app_path /tmp recv tcp://127.0.0.1 send ipc:///tmp/sock N/A N/A N/A self assertRaises Exception validate_input_params app_path /tmp recv tcp://127.0.0.1:89 send invalid://127.0.0.1:88 N/A N/A