Module Import alias Import alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ClassDef bases AttributeLoad NameLoad attr body Assign NameStore ListLoad ListLoad Str Str NameLoad Str ListLoad Str Str SubscriptLoad AttributeLoad NameLoad attr Index Num Str ListLoad Str Str SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpAdd BinOpAdd Str SubscriptLoad AttributeLoad NameLoad attr Index Num Str decorator_list ClassDef bases AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Num Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Str SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Str SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad If SubscriptLoad AttributeLoad NameLoad attr Index Str body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str orelse ImportFrom alias alias Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad Str Str Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr body If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str If Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Str body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Return NameLoad decorator_list Expr Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Return NameLoad decorator_list Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str TryExcept body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Return NameLoad decorator_list Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A tempfile N/A os N/A sys twisted.internet defer reactor twisted.internet.error ProcessExitedAlready twisted.python usage ooni.utils log net ooni.templates process httpt UsageOptions N/A N/A usage Options N/A N/A optParameters N/A N/A psiphonpath p None Specify psiphon python client path. N/A url u N/A N/A net GOOGLE_HUMANS N/A 0 Specify the URL to fetch over psiphon (default: http://www.google.com/humans.txt). N/A expected-body e N/A N/A net GOOGLE_HUMANS N/A 1 N/A N/A Specify the beginning of the expected body in the response (default:  N/A N/A net GOOGLE_HUMANS N/A 1 ) N/A PsiphonTest N/A N/A httpt HTTPTest N/A process ProcessTest N/A N/A 
    This class tests Psiphon python client

    test_psiphon:
      Starts a Psiphon, check if it bootstraps successfully
      (print a line in stdout).
      Then, perform an HTTP request using the proxy
     N/A name Psiphon Test N/A description Bootstraps Psiphon and does a HTTP GET for the specified URL N/A author juga N/A version 0.1.0 N/A timeout 120 N/A usageOptions UsageOptions _setUp N/A N/A self N/A N/A N/A N/A N/A self localOptions N/A socksproxy 127.0.0.1:1080 N/A N/A N/A N/A super PsiphonTest self _setUp N/A setUp N/A N/A self N/A N/A N/A N/A N/A log debug PsiphonTest.setUp N/A N/A N/A self report N/A bootstrapped_success None N/A N/A N/A self report N/A request_success None N/A N/A N/A self report N/A psiphon_found None N/A N/A N/A self report N/A default_configuration True N/A N/A self bootstrapped N/A N/A defer Deferred N/A N/A self url N/A N/A self localOptions N/A url N/A N/A N/A N/A self localOptions N/A url N/A N/A net GOOGLE_HUMANS N/A 0 N/A N/A N/A N/A self report N/A default_configuration False N/A N/A N/A N/A self localOptions N/A expected-body N/A N/A net GOOGLE_HUMANS N/A 1 N/A N/A N/A N/A self report N/A default_configuration False N/A N/A N/A self localOptions N/A psiphonpath N/A N/A N/A self psiphonpath N/A N/A self localOptions N/A psiphonpath N/A os path getenv N/A N/A self psiphonpath N/A N/A path join N/A getenv HOME psiphon-circumvention-system/pyclient/pyclient N/A N/A N/A log debug N/A psiphon path: %s N/A self psiphonpath N/A createCommand N/A N/A self N/A N/A N/A x 
from psi_client import connect
connect(False)
 N/A f N/A N/A tempfile NamedTemporaryFile delete False N/A N/A N/A f write x N/A N/A N/A f close N/A N/A self command N/A N/A sys executable N/A f name N/A N/A N/A log debug N/A command: %s N/A N/A join N/A self command N/A handleRead N/A N/A self stdout stderr N/A N/A N/A N/A Press Ctrl-C to terminate. N/A N/A self processDirector stdout N/A N/A N/A N/A N/A self bootstrapped called N/A N/A N/A N/A self report N/A bootstrapped_success True N/A N/A N/A log debug PsiphonTest: calling bootstrapped.callback N/A N/A N/A N/A self bootstrapped callback None N/A test_psiphon N/A N/A self N/A N/A N/A N/A N/A log debug PsiphonTest.test_psiphon N/A N/A N/A self createCommand N/A N/A N/A N/A N/A os path exists N/A self psiphonpath N/A N/A N/A N/A log err psiphon path does not exists, is it installed? N/A N/A N/A self report N/A psiphon_found False N/A N/A N/A log debug N/A Adding %s to report N/A self report N/A N/A N/A reactor callLater 0.0 N/A N/A self bootstrapped callback None N/A N/A self bootstrapped N/A N/A N/A self report N/A psiphon_found True N/A N/A N/A log debug N/A Adding %s to report N/A self report N/A finished N/A N/A self run N/A self command env N/A dict PYTHONPATH N/A self psiphonpath path N/A self psiphonpath usePTY 1 N/A N/A N/A self report N/A bootstrapped_success False callDoRequest N/A N/A _ N/A N/A N/A N/A N/A log debug N/A PsiphonTest.callDoRequest: %r N/A _ N/A d N/A N/A self doRequest N/A self url addSuccessToReport N/A N/A res N/A N/A N/A N/A N/A log debug PsiphonTest.callDoRequest.addSuccessToReport N/A N/A N/A N/A res body startswith N/A N/A self localOptions N/A expected-body N/A N/A N/A N/A self report N/A request_success True N/A N/A N/A N/A self report N/A request_success False N/A res N/A N/A N/A N/A d addCallback addSuccessToReport addFailureToReport N/A N/A res N/A N/A N/A N/A N/A log debug N/A PsiphonTest.callDoRequest.addFailureToReport. res=%r N/A res N/A N/A N/A self report N/A request_success False N/A res N/A N/A N/A N/A d addErrback addFailureToReport N/A d N/A N/A N/A N/A N/A self bootstrapped addCallback callDoRequest cleanup N/A N/A _ N/A N/A N/A N/A N/A log debug PsiphonTest:cleanup N/A N/A N/A N/A N/A N/A N/A self processDirector transport signalProcess INT N/A N/A N/A ProcessExitedAlready N/A N/A N/A N/A N/A os remove N/A N/A self command N/A 1 N/A finished N/A N/A N/A N/A N/A self bootstrapped addBoth cleanup N/A N/A self bootstrapped N/A N/A