Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad Str attr decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore IfExp AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args NameParam NameParam NameParam defaults vararg body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str decorator_list Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr With Call NameLoad AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Dict Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Dict Str Call AttributeLoad NameLoad attr Num Num Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Dict Str Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Num Num Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num keyword Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad NameLoad comprehension NameStore Call NameLoad Num For NameStore NameLoad body Expr Call NameLoad NameLoad Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num TupleLoad BinOpSub NameLoad Num BinOpSub NameLoad Num With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args defaults NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpSub NameLoad Num Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpSub NameLoad Num Call NameLoad AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad NameLoad comprehension NameStore Call NameLoad Num For NameStore NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad Str attr Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Num With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args defaults NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad GeneratorExp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad GeneratorExp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad comprehension NameStore NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad NameLoad comprehension NameStore Call NameLoad Num For NameStore NameLoad body Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Num With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args defaults NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Lambda arguments args defaults vararg SubscriptLoad NameLoad Slice Num Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad NameLoad comprehension NameStore Call NameLoad Num For NameStore NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Num For NameStore SubscriptLoad NameLoad Slice Num body Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args defaults NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore SubscriptLoad NameLoad Slice Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore SubscriptLoad NameLoad Slice Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Lambda arguments args defaults vararg SubscriptLoad NameLoad Slice Num Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad NameLoad comprehension NameStore Call NameLoad Num For NameStore NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num TupleLoad NameLoad NameLoad With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Lambda arguments args defaults NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num For NameStore SubscriptLoad NameLoad Slice Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Lambda arguments args defaults vararg SubscriptLoad NameLoad Slice Num Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad NameLoad comprehension NameStore Call NameLoad Num For NameStore NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body FunctionDef arguments args NameParam NameParam NameParam defaults vararg body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpMult Str Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Lambda arguments args defaults vararg SubscriptLoad NameLoad Slice Num Assign AttributeStore NameLoad attr Lambda arguments args NameParam NameParam NameParam defaults NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam defaults body ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Str Num Num NameLoad decorator_list decorator_list ClassDef bases NameLoad body Pass decorator_list Call AttributeLoad NameLoad attr keyword Num ClassDef bases NameLoad body Pass decorator_list Call AttributeLoad NameLoad attr keyword Num ClassDef bases NameLoad body Pass decorator_list Call AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num NameLoad Assign NameStore ListLoad NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword ListLoad Assign AttributeStore NameLoad attr ListLoad TupleLoad Num AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad keyword Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword ListLoad Str Str keyword Num keyword Num Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str ListLoad TupleLoad Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad keyword Num Assign AttributeStore NameLoad attr ListLoad Call AttributeLoad NameLoad attr keyword Num keyword Num keyword ListLoad Str Str Call AttributeLoad NameLoad attr keyword Num keyword Num keyword ListLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str ListLoad TupleLoad Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr keyword BinOpSub Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Call AttributeLoad NameLoad attr keyword Num keyword ListLoad Str Call AttributeLoad NameLoad attr keyword Num keyword ListLoad Str Call AttributeLoad NameLoad attr keyword Num keyword ListLoad Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad keyword Num Assign AttributeStore NameLoad attr ListLoad Call AttributeLoad NameLoad attr keyword Num keyword Num keyword ListLoad Str Str Call AttributeLoad NameLoad attr keyword Num keyword Num keyword ListLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str ListLoad TupleLoad Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr keyword BinOpSub Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad keyword Num Assign AttributeStore NameLoad attr ListLoad Call AttributeLoad NameLoad attr keyword Num keyword Num keyword ListLoad Str Str Call AttributeLoad NameLoad attr keyword Num keyword Num keyword ListLoad Str Str Call AttributeLoad NameLoad attr keyword Num keyword Num keyword ListLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str ListLoad TupleLoad Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr keyword BinOpSub Num Num Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr keyword BinOpSub Num Num Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad keyword Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Num keyword Num keyword ListLoad Str Str Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Str ListLoad TupleLoad Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr keyword BinOpSub Num Num Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr keyword BinOpSub Num Num Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Str Str Str decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad decorator_list
N/A N/A Tests for ImageCache class and helper functions. N/A datetime N/A os N/A tempfile N/A time N/A uuid N/A mock oslo_utils uuidutils N/A six ironic.common exception ironic.common image_service ironic.common images ironic.common utils ironic.drivers.modules image_cache ironic.tests base touch N/A N/A filename N/A N/A N/A N/A N/A N/A open filename w close N/A TestImageCacheFetch N/A N/A base TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestImageCacheFetch self setUp N/A N/A self master_dir N/A N/A tempfile mkdtemp N/A N/A self cache N/A N/A image_cache ImageCache N/A self master_dir None None N/A N/A self dest_dir N/A N/A tempfile mkdtemp N/A N/A self dest_path N/A N/A N/A os path join N/A self dest_dir dest N/A N/A self uuid N/A N/A uuidutils generate_uuid N/A N/A self master_path N/A N/A N/A os path join N/A self master_dir N/A self uuid N/A test_fetch_image_no_master_dir N/A N/A self mock_download mock_clean_up mock_fetch N/A N/A N/A N/A N/A self cache master_dir None N/A N/A N/A N/A self cache fetch_image N/A self uuid N/A self dest_path N/A N/A N/A self assertFalse N/A mock_download called N/A N/A N/A mock_fetch assert_called_once_with None N/A self uuid N/A self dest_path True N/A N/A N/A self assertFalse N/A mock_clean_up called N/A N/A N/A N/A mock patch object image_cache _fetch autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache clean_up autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache _download_image autospec True test_fetch_image_dest_and_master_uptodate N/A N/A self mock_cache_upd mock_dest_upd mock_link mock_download mock_clean_up N/A N/A N/A N/A N/A N/A self cache fetch_image N/A self uuid N/A self dest_path N/A N/A N/A mock_cache_upd assert_called_once_with N/A self master_path N/A self uuid None N/A N/A N/A mock_dest_upd assert_called_once_with N/A self master_path N/A self dest_path N/A N/A N/A self assertFalse N/A mock_link called N/A N/A N/A self assertFalse N/A mock_download called N/A N/A N/A self assertFalse N/A mock_clean_up called N/A N/A N/A N/A mock patch object N/A image_cache ImageCache clean_up autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache _download_image autospec True N/A N/A N/A mock patch object os link autospec True N/A N/A N/A mock patch object image_cache _delete_dest_path_if_stale return_value True autospec True N/A N/A N/A mock patch object image_cache _delete_master_path_if_stale return_value True autospec True test_fetch_image_dest_out_of_date N/A N/A self mock_cache_upd mock_dest_upd mock_link mock_download mock_clean_up N/A N/A N/A N/A N/A N/A self cache fetch_image N/A self uuid N/A self dest_path N/A N/A N/A mock_cache_upd assert_called_once_with N/A self master_path N/A self uuid None N/A N/A N/A mock_dest_upd assert_called_once_with N/A self master_path N/A self dest_path N/A N/A N/A mock_link assert_called_once_with N/A self master_path N/A self dest_path N/A N/A N/A self assertFalse N/A mock_download called N/A N/A N/A self assertFalse N/A mock_clean_up called N/A N/A N/A N/A mock patch object N/A image_cache ImageCache clean_up autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache _download_image autospec True N/A N/A N/A mock patch object os link autospec True N/A N/A N/A mock patch object image_cache _delete_dest_path_if_stale return_value False autospec True N/A N/A N/A mock patch object image_cache _delete_master_path_if_stale return_value True autospec True test_fetch_image_master_out_of_date N/A N/A self mock_cache_upd mock_dest_upd mock_link mock_download mock_clean_up N/A N/A N/A N/A N/A N/A self cache fetch_image N/A self uuid N/A self dest_path N/A N/A N/A mock_cache_upd assert_called_once_with N/A self master_path N/A self uuid None N/A N/A N/A mock_dest_upd assert_called_once_with N/A self master_path N/A self dest_path N/A N/A N/A self assertFalse N/A mock_link called N/A N/A N/A mock_download assert_called_once_with N/A self cache N/A self uuid N/A self master_path N/A self dest_path ctx None force_raw True N/A N/A N/A mock_clean_up assert_called_once_with N/A self cache N/A N/A N/A N/A mock patch object N/A image_cache ImageCache clean_up autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache _download_image autospec True N/A N/A N/A mock patch object os link autospec True N/A N/A N/A mock patch object image_cache _delete_dest_path_if_stale return_value True autospec True N/A N/A N/A mock patch object image_cache _delete_master_path_if_stale return_value False autospec True test_fetch_image_both_master_and_dest_out_of_date N/A N/A self mock_cache_upd mock_dest_upd mock_link mock_download mock_clean_up N/A N/A N/A N/A N/A N/A self cache fetch_image N/A self uuid N/A self dest_path N/A N/A N/A mock_cache_upd assert_called_once_with N/A self master_path N/A self uuid None N/A N/A N/A mock_dest_upd assert_called_once_with N/A self master_path N/A self dest_path N/A N/A N/A self assertFalse N/A mock_link called N/A N/A N/A mock_download assert_called_once_with N/A self cache N/A self uuid N/A self master_path N/A self dest_path ctx None force_raw True N/A N/A N/A mock_clean_up assert_called_once_with N/A self cache N/A N/A N/A N/A mock patch object N/A image_cache ImageCache clean_up autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache _download_image autospec True N/A N/A N/A mock patch object os link autospec True N/A N/A N/A mock patch object image_cache _delete_dest_path_if_stale return_value True autospec True N/A N/A N/A mock patch object image_cache _delete_master_path_if_stale return_value False autospec True test_fetch_image_not_uuid N/A N/A self mock_download mock_clean_up N/A N/A N/A href http://abc.com/ubuntu.qcow2 N/A href_encoded N/A N/A six PY2 N/A N/A href encode utf-8 href N/A href_converted N/A str N/A N/A uuid uuid5 N/A uuid NAMESPACE_URL href_encoded N/A master_path N/A N/A N/A os path join N/A self master_dir href_converted N/A N/A N/A N/A self cache fetch_image href N/A self dest_path N/A N/A N/A mock_download assert_called_once_with N/A self cache href master_path N/A self dest_path ctx None force_raw True N/A N/A N/A self assertTrue N/A mock_clean_up called N/A N/A N/A N/A mock patch object N/A image_cache ImageCache clean_up autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache _download_image autospec True test__download_image N/A N/A self mock_fetch N/A N/A _fake_fetch N/A N/A ctx uuid tmp_path N/A args N/A N/A N/A N/A self assertEqual N/A self uuid uuid N/A N/A N/A self assertNotEqual N/A self dest_path tmp_path N/A N/A N/A self assertNotEqual N/A N/A N/A os path dirname tmp_path N/A self master_dir N/A N/A open tmp_path w fp N/A N/A N/A N/A fp write TEST N/A N/A N/A mock_fetch side_effect _fake_fetch N/A N/A N/A N/A self cache _download_image N/A self uuid N/A self master_path N/A self dest_path N/A N/A N/A self assertTrue N/A N/A N/A os path isfile N/A self dest_path N/A N/A N/A self assertTrue N/A N/A N/A os path isfile N/A self master_path N/A N/A N/A self assertEqual N/A N/A N/A os stat N/A self dest_path st_ino N/A N/A N/A os stat N/A self master_path st_ino N/A N/A open N/A self dest_path fp N/A N/A N/A N/A self assertEqual TEST N/A N/A fp read N/A N/A N/A N/A mock patch object image_cache _fetch autospec True N/A TestUpdateImages N/A N/A base TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestUpdateImages self setUp N/A N/A self master_dir N/A N/A tempfile mkdtemp N/A N/A self dest_dir N/A N/A tempfile mkdtemp N/A N/A self dest_path N/A N/A N/A os path join N/A self dest_dir dest N/A N/A self uuid N/A N/A uuidutils generate_uuid N/A N/A self master_path N/A N/A N/A os path join N/A self master_dir N/A self uuid N/A test__delete_master_path_if_stale_glance_img_not_cached N/A N/A self mock_gis mock_path_exists mock_unlink N/A N/A N/A res N/A N/A image_cache _delete_master_path_if_stale N/A self master_path N/A self uuid None N/A N/A N/A self assertFalse N/A mock_gis called N/A N/A N/A self assertFalse N/A mock_unlink called N/A N/A N/A mock_path_exists assert_called_once_with N/A self master_path N/A N/A N/A self assertFalse res N/A N/A N/A N/A mock patch object N/A os path exists return_value False autospec True N/A N/A N/A mock patch object image_service get_image_service autospec True test__delete_master_path_if_stale_glance_img N/A N/A self mock_gis mock_path_exists mock_unlink N/A N/A N/A res N/A N/A image_cache _delete_master_path_if_stale N/A self master_path N/A self uuid None N/A N/A N/A self assertFalse N/A mock_gis called N/A N/A N/A self assertFalse N/A mock_unlink called N/A N/A N/A mock_path_exists assert_called_once_with N/A self master_path N/A N/A N/A self assertTrue res N/A N/A N/A N/A mock patch object N/A os path exists return_value True autospec True N/A N/A N/A mock patch object image_service get_image_service autospec True test__delete_master_path_if_stale_no_master N/A N/A self mock_gis mock_unlink N/A N/A N/A res N/A N/A image_cache _delete_master_path_if_stale N/A self master_path http://11 None N/A N/A N/A self assertFalse N/A mock_gis called N/A N/A N/A self assertFalse N/A mock_unlink called N/A N/A N/A self assertFalse res N/A N/A N/A N/A mock patch object image_service get_image_service autospec True test__delete_master_path_if_stale_no_updated_at N/A N/A self mock_gis mock_unlink N/A N/A N/A N/A touch N/A self master_path N/A href http://awesomefreeimages.al/img111 N/A N/A N/A N/A mock_gis return_value show return_value N/A N/A res N/A N/A image_cache _delete_master_path_if_stale N/A self master_path href None N/A N/A N/A mock_gis assert_called_once_with href context None N/A N/A N/A self assertFalse N/A mock_unlink called N/A N/A N/A self assertTrue res N/A N/A N/A N/A mock patch object image_service get_image_service autospec True test__delete_master_path_if_stale_master_up_to_date N/A N/A self mock_gis mock_unlink N/A N/A N/A N/A touch N/A self master_path N/A href http://awesomefreeimages.al/img999 N/A N/A N/A N/A mock_gis return_value show return_value N/A updated_at N/A N/A datetime datetime 1999 11 15 8 12 31 N/A res N/A N/A image_cache _delete_master_path_if_stale N/A self master_path href None N/A N/A N/A mock_gis assert_called_once_with href context None N/A N/A N/A self assertFalse N/A mock_unlink called N/A N/A N/A self assertTrue res N/A N/A N/A N/A mock patch object image_service get_image_service autospec True test__delete_master_path_if_stale_master_same_time N/A N/A self mock_gis mock_unlink N/A N/A N/A N/A touch N/A self master_path N/A mtime N/A N/A utils unix_file_modification_datetime N/A self master_path N/A href http://awesomefreeimages.al/img999 N/A N/A N/A N/A mock_gis return_value show return_value N/A updated_at mtime N/A res N/A N/A image_cache _delete_master_path_if_stale N/A self master_path href None N/A N/A N/A mock_gis assert_called_once_with href context None N/A N/A N/A self assertFalse N/A mock_unlink called N/A N/A N/A self assertTrue res N/A N/A N/A N/A mock patch object image_service get_image_service autospec True test__delete_master_path_if_stale_out_of_date N/A N/A self mock_gis mock_unlink N/A N/A N/A N/A touch N/A self master_path N/A href http://awesomefreeimages.al/img999 N/A N/A N/A N/A mock_gis return_value show return_value N/A updated_at N/A N/A datetime datetime N/A N/A N/A N/A N/A datetime datetime utcnow year 1 11 15 8 12 31 N/A res N/A N/A image_cache _delete_master_path_if_stale N/A self master_path href None N/A N/A N/A mock_gis assert_called_once_with href context None N/A N/A N/A mock_unlink assert_called_once_with N/A self master_path N/A N/A N/A self assertFalse res N/A N/A N/A N/A mock patch object image_service get_image_service autospec True test__delete_dest_path_if_stale_no_dest N/A N/A self mock_unlink N/A N/A N/A res N/A N/A image_cache _delete_dest_path_if_stale N/A self master_path N/A self dest_path N/A N/A N/A self assertFalse N/A mock_unlink called N/A N/A N/A self assertFalse res N/A test__delete_dest_path_if_stale_no_master N/A N/A self mock_unlink N/A N/A N/A N/A touch N/A self dest_path N/A res N/A N/A image_cache _delete_dest_path_if_stale N/A self master_path N/A self dest_path N/A N/A N/A mock_unlink assert_called_once_with N/A self dest_path N/A N/A N/A self assertFalse res N/A test__delete_dest_path_if_stale_out_of_date N/A N/A self mock_unlink N/A N/A N/A N/A touch N/A self master_path N/A N/A touch N/A self dest_path N/A res N/A N/A image_cache _delete_dest_path_if_stale N/A self master_path N/A self dest_path N/A N/A N/A mock_unlink assert_called_once_with N/A self dest_path N/A N/A N/A self assertFalse res N/A test__delete_dest_path_if_stale_up_to_date N/A N/A self mock_unlink N/A N/A N/A N/A touch N/A self master_path N/A N/A N/A os link N/A self master_path N/A self dest_path N/A res N/A N/A image_cache _delete_dest_path_if_stale N/A self master_path N/A self dest_path N/A N/A N/A self assertFalse N/A mock_unlink called N/A N/A N/A self assertTrue res N/A N/A N/A N/A N/A mock patch object os unlink autospec True TestImageCacheCleanUp N/A N/A base TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestImageCacheCleanUp self setUp N/A N/A self master_dir N/A N/A tempfile mkdtemp N/A N/A self cache N/A N/A image_cache ImageCache N/A self master_dir cache_size 10 cache_ttl 600 N/A test_clean_up_old_deleted N/A N/A self mock_clean_size N/A N/A N/A N/A mock_clean_size return_value None N/A files N/A N/A N/A N/A os path join N/A self master_dir N/A str i N/A i N/A range 2 N/A filename files N/A N/A N/A touch filename N/A new_current_time N/A N/A N/A time time 900 N/A N/A N/A os utime N/A files N/A 0 N/A N/A new_current_time 100 N/A new_current_time 100 N/A N/A N/A N/A mock patch object time time N/A N/A N/A N/A new_current_time N/A N/A N/A N/A N/A self cache clean_up N/A N/A N/A mock_clean_size assert_called_once_with N/A self cache N/A mock ANY None N/A survived N/A N/A N/A mock_clean_size call_args N/A 0 N/A 1 N/A N/A N/A self assertEqual 1 N/A len survived N/A N/A N/A self assertEqual N/A files N/A 0 N/A N/A survived N/A 0 N/A 0 N/A N/A N/A self assertEqual N/A int N/A new_current_time 100 N/A int N/A N/A survived N/A 0 N/A 1 N/A N/A N/A self assertEqual N/A int N/A new_current_time 100 N/A int N/A N/A N/A survived N/A 0 N/A 2 st_mtime N/A N/A N/A N/A mock patch object N/A image_cache ImageCache _clean_up_ensure_cache_size autospec True test_clean_up_old_with_amount N/A N/A self mock_clean_size N/A N/A N/A files N/A N/A N/A N/A os path join N/A self master_dir N/A str i N/A i N/A range 2 N/A filename files N/A N/A N/A N/A N/A open filename wb write X N/A new_current_time N/A N/A N/A time time 900 N/A N/A N/A N/A mock patch object time time N/A N/A N/A N/A new_current_time N/A N/A N/A N/A N/A self cache clean_up amount 1 N/A N/A N/A self assertFalse N/A mock_clean_size called N/A N/A N/A self assertTrue N/A any N/A N/A N/A N/A os path exists f N/A f files N/A N/A N/A self assertFalse N/A all N/A N/A N/A N/A os path exists f N/A f files N/A N/A N/A N/A mock patch object N/A image_cache ImageCache _clean_up_ensure_cache_size autospec True test_clean_up_files_with_links_untouched N/A N/A self mock_clean_size N/A N/A N/A N/A mock_clean_size return_value None N/A files N/A N/A N/A N/A os path join N/A self master_dir N/A str i N/A i N/A range 2 N/A filename files N/A N/A N/A touch filename N/A N/A N/A os link filename N/A filename copy N/A new_current_time N/A N/A N/A time time 900 N/A N/A N/A N/A mock patch object time time N/A N/A N/A N/A new_current_time N/A N/A N/A N/A N/A self cache clean_up N/A filename files N/A N/A N/A N/A self assertTrue N/A N/A N/A os path exists filename N/A N/A N/A mock_clean_size assert_called_once_with N/A mock ANY N/A None N/A N/A N/A N/A mock patch object N/A image_cache ImageCache _clean_up_ensure_cache_size autospec True test_clean_up_ensure_cache_size N/A N/A self mock_clean_ttl N/A N/A N/A N/A mock_clean_ttl side_effect N/A N/A N/A N/A xx N/A xx N/A 1 N/A files N/A N/A N/A N/A os path join N/A self master_dir N/A str i N/A i N/A range 6 N/A filename files N/A N/A N/A open filename w fp N/A N/A N/A N/A fp write 123 N/A new_current_time N/A N/A N/A time time 100 N/A filename N/A files N/A 3 N/A N/A N/A N/A os utime filename N/A new_current_time new_current_time N/A N/A N/A N/A mock patch object time time N/A N/A N/A N/A new_current_time N/A N/A N/A N/A N/A self cache clean_up N/A filename N/A files N/A 3 N/A N/A N/A N/A self assertTrue N/A N/A N/A os path exists filename N/A filename N/A files N/A 3 N/A N/A N/A N/A self assertFalse N/A N/A N/A os path exists filename N/A N/A N/A mock_clean_ttl assert_called_once_with N/A mock ANY N/A mock ANY None N/A N/A N/A N/A mock patch object N/A image_cache ImageCache _clean_up_too_old autospec True test_clean_up_ensure_cache_size_with_amount N/A N/A self mock_clean_ttl N/A N/A N/A N/A mock_clean_ttl side_effect N/A N/A N/A N/A xx N/A xx N/A 1 N/A files N/A N/A N/A N/A os path join N/A self master_dir N/A str i N/A i N/A range 6 N/A filename files N/A N/A N/A open filename w fp N/A N/A N/A N/A fp write 123 N/A new_current_time N/A N/A N/A time time 100 N/A N/A N/A os utime N/A files N/A 0 N/A new_current_time new_current_time N/A N/A N/A N/A mock patch object time time N/A N/A N/A N/A new_current_time N/A N/A N/A N/A N/A self cache clean_up amount 15 N/A N/A N/A self assertTrue N/A N/A N/A os path exists N/A files N/A 0 N/A filename N/A files N/A 5 N/A N/A N/A N/A self assertFalse N/A N/A N/A os path exists filename N/A N/A N/A mock_clean_ttl assert_called_once_with N/A mock ANY N/A mock ANY 15 N/A N/A N/A N/A mock patch object N/A image_cache ImageCache _clean_up_too_old autospec True test_clean_up_cache_still_large N/A N/A self mock_clean_ttl mock_log N/A N/A N/A N/A mock_clean_ttl side_effect N/A N/A N/A N/A xx N/A xx N/A 1 N/A files N/A N/A N/A N/A os path join N/A self master_dir N/A str i N/A i N/A range 2 N/A filename files N/A N/A N/A open filename w fp N/A N/A N/A N/A fp write 123 N/A N/A N/A os link filename N/A filename copy N/A N/A N/A N/A self cache clean_up N/A filename files N/A N/A N/A N/A self assertTrue N/A N/A N/A os path exists filename N/A N/A N/A self assertTrue N/A mock_log called N/A N/A N/A mock_clean_ttl assert_called_once_with N/A mock ANY N/A mock ANY None N/A N/A N/A N/A mock patch object N/A image_cache LOG info autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache _clean_up_too_old autospec True test_temp_images_not_cleaned N/A N/A self mock_fetch mock_rmtree N/A N/A _fake_fetch N/A N/A ctx uuid tmp_path N/A args N/A N/A N/A open tmp_path w fp N/A N/A N/A N/A fp write N/A TEST 10 N/A N/A N/A N/A self cache clean_up N/A N/A N/A self assertTrue N/A N/A N/A os path exists tmp_path N/A N/A N/A mock_fetch side_effect _fake_fetch N/A master_path N/A N/A N/A os path join N/A self master_dir uuid N/A dest_path N/A N/A N/A os path join N/A N/A tempfile mkdtemp dest N/A N/A N/A N/A self cache _download_image uuid master_path dest_path N/A N/A N/A self assertTrue N/A mock_rmtree called N/A N/A N/A N/A mock patch object utils rmtree_without_raise autospec True N/A N/A N/A mock patch object image_cache _fetch autospec True test_temp_dir_exception N/A N/A self mock_fetch mock_rmtree N/A N/A N/A N/A mock_fetch side_effect N/A exception IronicException N/A N/A N/A self assertRaises N/A exception IronicException N/A N/A self cache _download_image uuid fake fake N/A N/A N/A self assertTrue N/A mock_rmtree called N/A N/A N/A N/A mock patch object utils rmtree_without_raise autospec True N/A N/A N/A mock patch object image_cache _fetch autospec True test_clean_up_amount_not_satisfied N/A N/A self mock_clean_size mock_clean_ttl mock_log N/A N/A N/A N/A mock_clean_ttl side_effect N/A N/A N/A N/A xx N/A xx N/A 1 N/A N/A mock_clean_size side_effect N/A N/A N/A self listing amount N/A amount N/A N/A N/A N/A self cache clean_up amount 15 N/A N/A N/A self assertTrue N/A mock_log called N/A N/A N/A N/A mock patch object N/A image_cache LOG warning autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache _clean_up_too_old autospec True N/A N/A N/A mock patch object N/A image_cache ImageCache _clean_up_ensure_cache_size autospec True test_cleanup_ordering N/A N/A self N/A N/A ParentCache N/A N/A image_cache ImageCache N/A __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super ParentCache self __init__ a 1 1 None N/A N/A Cache1 N/A ParentCache N/A N/A N/A N/A N/A image_cache cleanup priority 10000 Cache2 N/A ParentCache N/A N/A N/A N/A N/A image_cache cleanup priority 20000 Cache3 N/A ParentCache N/A N/A N/A N/A N/A image_cache cleanup priority 10000 N/A N/A N/A self assertEqual N/A N/A N/A image_cache _cache_cleanup_list N/A 0 N/A 1 Cache2 N/A item_possibilities N/A Cache1 Cache3 N/A second_item_actual N/A N/A N/A image_cache _cache_cleanup_list N/A 1 N/A 1 N/A N/A N/A self assertIn second_item_actual item_possibilities N/A N/A N/A item_possibilities remove second_item_actual N/A third_item_actual N/A N/A N/A image_cache _cache_cleanup_list N/A 2 N/A 1 N/A N/A N/A self assertEqual N/A item_possibilities N/A 0 third_item_actual N/A N/A CleanupImageCacheTestCase N/A N/A base TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super CleanupImageCacheTestCase self setUp N/A N/A self mock_first_cache N/A N/A mock MagicMock spec_set N/A N/A N/A self mock_second_cache N/A N/A mock MagicMock spec_set N/A N/A N/A self cache_cleanup_list N/A N/A 50 N/A self mock_first_cache N/A 20 N/A self mock_second_cache N/A N/A N/A N/A self mock_first_cache return_value master_dir first_cache_dir N/A N/A N/A N/A self mock_second_cache return_value master_dir second_cache_dir N/A test_no_clean_up N/A N/A self mock_image_service mock_statvfs cache_cleanup_list_mock N/A N/A N/A mock_show N/A N/A mock_image_service return_value show N/A N/A mock_show return_value N/A dict size 42 N/A N/A mock_statvfs return_value N/A N/A mock MagicMock spec_set N/A f_frsize f_bavail f_frsize 1 f_bavail 1024 N/A N/A N/A cache_cleanup_list_mock __iter__ return_value N/A self cache_cleanup_list N/A N/A N/A image_cache clean_up_caches None master_dir N/A N/A uuid path N/A N/A N/A mock_show assert_called_once_with uuid N/A N/A N/A mock_statvfs assert_called_once_with master_dir N/A N/A N/A self assertFalse N/A N/A N/A N/A self mock_first_cache return_value clean_up called N/A N/A N/A self assertFalse N/A N/A N/A N/A self mock_second_cache return_value clean_up called N/A N/A N/A mock_statvfs assert_called_once_with master_dir N/A test_one_clean_up N/A N/A self mock_stat mock_image_service mock_statvfs cache_cleanup_list_mock N/A N/A N/A N/A N/A mock_stat return_value st_dev 1 N/A mock_show N/A N/A mock_image_service return_value show N/A N/A mock_show return_value N/A dict size 42 N/A N/A mock_statvfs side_effect N/A N/A N/A mock MagicMock f_frsize 1 f_bavail 1 spec_set N/A f_frsize f_bavail N/A N/A mock MagicMock f_frsize 1 f_bavail 1024 spec_set N/A f_frsize f_bavail N/A N/A N/A cache_cleanup_list_mock __iter__ return_value N/A self cache_cleanup_list N/A N/A N/A image_cache clean_up_caches None master_dir N/A N/A uuid path N/A N/A N/A mock_show assert_called_once_with uuid N/A N/A N/A mock_statvfs assert_called_with master_dir N/A N/A N/A self assertEqual 2 N/A mock_statvfs call_count N/A N/A N/A N/A N/A N/A self mock_first_cache return_value clean_up assert_called_once_with amount N/A 42 1 N/A N/A N/A self assertFalse N/A N/A N/A N/A self mock_second_cache return_value clean_up called N/A mock_stat_calls_expected N/A N/A N/A mock call master_dir N/A N/A mock call first_cache_dir N/A mock_statvfs_calls_expected N/A N/A N/A mock call master_dir N/A N/A mock call master_dir N/A N/A N/A self assertEqual mock_stat_calls_expected N/A mock_stat mock_calls N/A N/A N/A self assertEqual mock_statvfs_calls_expected N/A mock_statvfs mock_calls N/A N/A N/A N/A mock patch object os stat autospec True test_clean_up_another_fs N/A N/A self mock_stat mock_image_service mock_statvfs cache_cleanup_list_mock N/A N/A N/A N/A mock_stat side_effect N/A N/A N/A mock MagicMock st_dev 1 spec_set N/A st_dev N/A N/A mock MagicMock st_dev 2 spec_set N/A st_dev N/A N/A mock MagicMock st_dev 1 spec_set N/A st_dev N/A mock_show N/A N/A mock_image_service return_value show N/A N/A mock_show return_value N/A dict size 42 N/A N/A mock_statvfs side_effect N/A N/A N/A mock MagicMock f_frsize 1 f_bavail 1 spec_set N/A f_frsize f_bavail N/A N/A mock MagicMock f_frsize 1 f_bavail 1024 spec_set N/A f_frsize f_bavail N/A N/A N/A cache_cleanup_list_mock __iter__ return_value N/A self cache_cleanup_list N/A N/A N/A image_cache clean_up_caches None master_dir N/A N/A uuid path N/A N/A N/A mock_show assert_called_once_with uuid N/A N/A N/A mock_statvfs assert_called_with master_dir N/A N/A N/A self assertEqual 2 N/A mock_statvfs call_count N/A N/A N/A N/A N/A N/A self mock_second_cache return_value clean_up assert_called_once_with amount N/A 42 1 N/A N/A N/A self assertFalse N/A N/A N/A N/A self mock_first_cache return_value clean_up called N/A mock_stat_calls_expected N/A N/A N/A mock call master_dir N/A N/A mock call first_cache_dir N/A N/A mock call second_cache_dir N/A mock_statvfs_calls_expected N/A N/A N/A mock call master_dir N/A N/A mock call master_dir N/A N/A N/A self assertEqual mock_stat_calls_expected N/A mock_stat mock_calls N/A N/A N/A self assertEqual mock_statvfs_calls_expected N/A mock_statvfs mock_calls N/A N/A N/A N/A mock patch object os stat autospec True test_both_clean_up N/A N/A self mock_stat mock_image_service mock_statvfs cache_cleanup_list_mock N/A N/A N/A N/A N/A mock_stat return_value st_dev 1 N/A mock_show N/A N/A mock_image_service return_value show N/A N/A mock_show return_value N/A dict size 42 N/A N/A mock_statvfs side_effect N/A N/A N/A mock MagicMock f_frsize 1 f_bavail 1 spec_set N/A f_frsize f_bavail N/A N/A mock MagicMock f_frsize 1 f_bavail 2 spec_set N/A f_frsize f_bavail N/A N/A mock MagicMock f_frsize 1 f_bavail 1024 spec_set N/A f_frsize f_bavail N/A N/A N/A cache_cleanup_list_mock __iter__ return_value N/A self cache_cleanup_list N/A N/A N/A image_cache clean_up_caches None master_dir N/A N/A uuid path N/A N/A N/A mock_show assert_called_once_with uuid N/A N/A N/A mock_statvfs assert_called_with master_dir N/A N/A N/A self assertEqual 3 N/A mock_statvfs call_count N/A N/A N/A N/A N/A N/A self mock_first_cache return_value clean_up assert_called_once_with amount N/A 42 1 N/A N/A N/A N/A N/A N/A self mock_second_cache return_value clean_up assert_called_once_with amount N/A 42 2 N/A mock_stat_calls_expected N/A N/A N/A mock call master_dir N/A N/A mock call first_cache_dir N/A N/A mock call second_cache_dir N/A mock_statvfs_calls_expected N/A N/A N/A mock call master_dir N/A N/A mock call master_dir N/A N/A mock call master_dir N/A N/A N/A self assertEqual mock_stat_calls_expected N/A mock_stat mock_calls N/A N/A N/A self assertEqual mock_statvfs_calls_expected N/A mock_statvfs mock_calls N/A N/A N/A N/A mock patch object os stat autospec True test_clean_up_fail N/A N/A self mock_stat mock_image_service mock_statvfs cache_cleanup_list_mock N/A N/A N/A N/A N/A mock_stat return_value st_dev 1 N/A mock_show N/A N/A mock_image_service return_value show N/A N/A mock_show return_value N/A dict size 42 N/A N/A mock_statvfs return_value N/A N/A mock MagicMock f_frsize 1 f_bavail 1 spec_set N/A f_frsize f_bavail N/A N/A N/A cache_cleanup_list_mock __iter__ return_value N/A self cache_cleanup_list N/A N/A N/A self assertRaises N/A exception InsufficientDiskSpace N/A image_cache clean_up_caches None master_dir N/A N/A uuid path N/A N/A N/A mock_show assert_called_once_with uuid N/A N/A N/A mock_statvfs assert_called_with master_dir N/A N/A N/A self assertEqual 3 N/A mock_statvfs call_count N/A N/A N/A N/A N/A N/A self mock_first_cache return_value clean_up assert_called_once_with amount N/A 42 1 N/A N/A N/A N/A N/A N/A self mock_second_cache return_value clean_up assert_called_once_with amount N/A 42 1 N/A mock_stat_calls_expected N/A N/A N/A mock call master_dir N/A N/A mock call first_cache_dir N/A N/A mock call second_cache_dir N/A mock_statvfs_calls_expected N/A N/A N/A mock call master_dir N/A N/A mock call master_dir N/A N/A mock call master_dir N/A N/A N/A self assertEqual mock_stat_calls_expected N/A mock_stat mock_calls N/A N/A N/A self assertEqual mock_statvfs_calls_expected N/A mock_statvfs mock_calls N/A N/A N/A N/A mock patch object os stat autospec True N/A N/A N/A N/A mock patch object image_cache _cache_cleanup_list autospec True N/A N/A N/A mock patch object os statvfs autospec True N/A N/A N/A mock patch object image_service get_image_service autospec True TestFetchCleanup N/A N/A base TestCase N/A test__fetch N/A N/A self mock_clean mock_raw mock_fetch mock_size N/A N/A N/A N/A mock_size return_value 100 N/A N/A N/A image_cache _fetch fake fake-uuid /foo/bar force_raw True N/A N/A N/A mock_fetch assert_called_once_with fake fake-uuid /foo/bar.part force_raw False N/A N/A N/A mock_clean assert_called_once_with /foo 100 N/A N/A N/A mock_raw assert_called_once_with fake-uuid /foo/bar /foo/bar.part N/A N/A N/A N/A mock patch object images converted_size autospec True N/A N/A N/A mock patch object images fetch autospec True N/A N/A N/A mock patch object images image_to_raw autospec True N/A N/A N/A mock patch object image_cache _clean_up_caches autospec True N/A