Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str With Call AttributeLoad NameLoad attr Str keyword NameLoad NameStore body Assign AttributeStore NameLoad attr Dict Str NameLoad Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore BinOpMod Str NameLoad With Call AttributeLoad NameLoad attr Str keyword NameLoad NameStore body Assign AttributeStore NameLoad attr Dict Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr Str keyword NameLoad NameStore body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad Str ListLoad Str Str Assign NameStore ListLoad ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str decorator_list FunctionDef arguments args defaults body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Str Str Str decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore BinOpMod Str NameLoad Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Dict Str Str Assign NameStore ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad Str Str Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad body Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Dict Str Str Assign NameStore ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad Str Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad body Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad TupleStore NameStore NameStore NameStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad Assert CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore body With Call NameLoad AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMod Str NameLoad Assert CompareEq Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore body With Call NameLoad AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMod Str NameLoad Assert CompareEq Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call NameLoad Num Str Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad NameLoad TupleStore NameStore NameStore NameStore NameStore body With Call NameLoad AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args defaults body Assign NameStore Dict Str Str Str Str Assign NameStore Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad Str Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad NameLoad NameLoad TupleStore NameStore NameStore NameStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str ListLoad Dict Str Str Str Assign NameStore ListLoad Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Dict Str Num Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body With Call AttributeLoad NameLoad attr Str keyword NameLoad NameStore body Assign NameStore Call AttributeLoad Call NameLoad attr Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Str keyword NameLoad NameStore body With Call AttributeLoad NameLoad attr Str keyword NameLoad NameStore body With Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str TryFinally body Assign NameStore Call AttributeLoad NameLoad attr Num With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str With Call NameLoad NameLoad NameStore body Assert CompareEq Call AttributeLoad NameLoad attr Str With Call NameLoad NameLoad NameStore body Assert CompareEq Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareEq Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num finalbody Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Dict Str Str With Call AttributeLoad NameLoad attr Str NameStore body Assign AttributeStore AttributeLoad Call NameLoad attr attr NameLoad With Call AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad Call NameLoad Str attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore TupleLoad Str Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore TupleLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Str Assign AttributeStore NameLoad attr Str Assign NameStore BinOpMod Str TupleLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Str Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr Str NameStore body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Dict Str Str Str Str Str Str Num Num Str ListLoad NameLoad Str Num Assert CompareIs Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Str Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr Str NameStore body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Dict Str Str Str Str Str Str Num Num Str ListLoad NameLoad Str Num Assert CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore BinOpAdd BinOpAdd Str NameLoad Str Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore ListLoad Str Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assert CompareEq Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore ListLoad Str Str Assign NameStore ListLoad Str Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword BinOpMod Str NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad TupleStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assert CompareEq NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad Str Str Assign NameStore ListLoad Str Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad TupleStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad Str Str Str Str Assign NameStore ListLoad Str Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad TupleStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore ListLoad Str Assign NameStore ListLoad TupleLoad NameLoad Str TupleLoad NameLoad Str Assign NameStore Call NameLoad ListLoad Str Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Num NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict NameLoad NameLoad Dict Dict Assign NameStore ListLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad TupleStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Assert CompareEq AttributeLoad NameLoad attr Num Assert CompareEq Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad ListLoad Str Str ListLoad Str Assign NameStore ListLoad Str Str Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad Str Str Call AttributeLoad NameLoad attr Str keyword Lambda arguments args NameParam NameParam NameParam NameParam defaults Call AttributeLoad NameLoad attr TupleStore NameStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assert CompareEq NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad Assert CompareEq AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Dict Str Dict Str Str Dict Str Str Str Str Str NameLoad Dict Str Str Str Str Str Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad TupleStore NameStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assert CompareEq NameLoad SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad Dict Str Str Str Str ListLoad Str Str Dict Str Str Str Str ListLoad Str Str With Call AttributeLoad NameLoad attr Str NameStore body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assert CompareEq Call NameLoad Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad TupleStore NameStore NameStore body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad With Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str keyword Num Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Num Str With Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str keyword Num Assert CompareEq NameLoad Num Assert CompareIn Str NameLoad decorator_list ClassDef bases body FunctionDef arguments args NameParam defaults body Assign NameStore Str Assert CompareEq Call AttributeLoad Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str NameLoad keyword Dict attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Num keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Num keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Num keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Num keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Num keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Num keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareIs Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Dict Str Str keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str keyword Dict Assert CompareIs Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str ListLoad Str Str keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr ListLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str ListLoad Str Str keyword Dict Expr Call AttributeLoad NameLoad attr With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Str Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Str Str Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str NameLoad keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str NameLoad keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Dict Str Str Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str NameLoad keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str NameLoad keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assert CompareEq Call AttributeLoad NameLoad attr Str decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assert CompareEq NameLoad TupleLoad NameLoad Call NameLoad Num decorator_list FunctionDef arguments args defaults body Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assert CompareEq NameLoad TupleLoad NameLoad Call NameLoad Num decorator_list FunctionDef arguments args defaults body Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assert CompareEq NameLoad TupleLoad NameLoad Call NameLoad Num decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad ListLoad Str Str ListLoad Str Str Assign NameStore ListLoad ListLoad Str Str Str ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad TupleLoad Str Str TupleLoad Str Str Assign NameStore ListLoad TupleLoad Str Str TupleLoad Str Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad NameLoad NameLoad TupleStore NameStore body Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Str Assert CompareIn Call AttributeLoad NameLoad attr keyword NameLoad keyword Str keyword NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad TupleLoad Str Str TupleLoad Str Str Assign NameStore ListLoad TupleLoad Str Str TupleLoad Str Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad NameLoad NameLoad TupleStore NameStore body Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Str Assert CompareIn Call AttributeLoad NameLoad attr keyword NameLoad keyword Str keyword NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad TupleLoad Str Str TupleLoad Str Str Assign NameStore ListLoad TupleLoad Str Str TupleLoad Str Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str TupleStore NameStore NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assert CompareEq Call NameLoad Str Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Str Str Str ListLoad Str Str Str ListLoad Str Str Str Assign NameStore ListLoad Str Str Str Assert CompareEq NameLoad NameLoad Assert CompareEq ListLoad Str Call AttributeLoad NameLoad attr ListLoad ListLoad Str Str Str keyword Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Str Str Str Str ListLoad Str Str Str Str ListLoad Str Str Str Assign NameStore ListLoad Str Str Str Str Str Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Str Str Assign NameStore ListLoad Str Str Str Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num keyword Num keyword Num keyword Num Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str Str Str decorator_list ClassDef bases body FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Str Assert CompareEq NameLoad Call AttributeLoad NameLoad attr Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults NameLoad keyword Lambda arguments args NameParam NameParam NameParam NameParam defaults NameLoad Assign NameStore BinOpMult Str Num With Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad With Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str Str Str Str Str Expr Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Dict Str Str Str Str Str Str Str Dict Str Str Str Num Num Num Str Dict Str Str Str Dict Str Str Assign NameStore Dict Str Str Str Str Str Str Str Dict Str Str Str Str Num Num Str Dict Str Str Set Str Str Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Dict Str Str Str Str Str Num Num Num Num Num Str Dict Str Str Str Dict Str Str Str Dict Str Str Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list
N/A N/A contextlib N/A datetime N/A json N/A os N/A shutil N/A stat N/A tempfile N/A mock pytest raises paasta_tools utils test_get_git_url_provided_by_serviceyaml N/A N/A N/A N/A N/A service giiiiiiiiiiit N/A expected git@some_random_host:foobar N/A N/A N/A mock patch service_configuration_lib.read_service_configuration autospec True mock_read_service_configuration N/A N/A N/A mock_read_service_configuration return_value N/A git_url expected N/A N/A N/A N/A utils get_git_url service expected N/A N/A N/A mock_read_service_configuration assert_called_once_with service soa_dir N/A utils DEFAULT_SOA_DIR N/A test_get_git_url_default N/A N/A N/A N/A N/A service giiiiiiiiiiit N/A expected N/A git@git.yelpcorp.com:services/%s.git service N/A N/A N/A mock patch service_configuration_lib.read_service_configuration autospec True mock_read_service_configuration N/A N/A N/A mock_read_service_configuration return_value N/A N/A N/A N/A N/A utils get_git_url service expected N/A N/A N/A mock_read_service_configuration assert_called_once_with service soa_dir N/A utils DEFAULT_SOA_DIR N/A test_format_log_line N/A N/A N/A N/A N/A input_line foo N/A fake_cluster fake_cluster N/A fake_service fake_service N/A fake_instance fake_instance N/A fake_component build N/A fake_level debug N/A fake_now fake_now N/A expected N/A N/A json dumps N/A timestamp level cluster service instance component message fake_now fake_level fake_cluster fake_service fake_instance fake_component input_line sort_keys True N/A N/A N/A mock patch paasta_tools.utils._now autospec True mock_now N/A N/A N/A mock_now return_value fake_now N/A actual N/A N/A utils format_log_line level fake_level cluster fake_cluster service fake_service instance fake_instance component fake_component line input_line N/A N/A actual expected N/A test_deploy_whitelist_to_constraints N/A N/A N/A N/A N/A fake_whitelist N/A fake_location_type N/A fake_location anotherfake_location N/A expected_constraints N/A N/A fake_location_type LIKE fake_location|anotherfake_location N/A constraints N/A N/A utils deploy_whitelist_to_constraints fake_whitelist N/A N/A constraints expected_constraints N/A test_format_log_line_with_timestamp N/A N/A N/A N/A N/A input_line foo N/A fake_cluster fake_cluster N/A fake_service fake_service N/A fake_instance fake_instance N/A fake_component build N/A fake_level debug N/A fake_timestamp fake_timestamp N/A expected N/A N/A json dumps N/A timestamp level cluster service instance component message fake_timestamp fake_level fake_cluster fake_service fake_instance fake_component input_line sort_keys True N/A actual N/A N/A utils format_log_line fake_level fake_cluster fake_service fake_instance fake_component input_line timestamp fake_timestamp N/A N/A actual expected N/A test_format_log_line_rejects_invalid_components N/A N/A N/A N/A N/A N/A raises N/A utils NoSuchLogComponent N/A N/A N/A N/A utils format_log_line level debug cluster fake_cluster service fake_service instance fake_instance line fake_line component BOGUS_COMPONENT N/A test_ScribeLogWriter_log_raise_on_unknown_level N/A N/A N/A N/A N/A N/A raises N/A utils NoSuchLogLevel N/A N/A N/A N/A N/A N/A utils ScribeLogWriter log fake_service fake_line build BOGUS_LEVEL N/A test_get_log_name_for_service N/A N/A N/A N/A N/A service foo N/A expected N/A stream_paasta_%s service N/A N/A N/A N/A utils get_log_name_for_service service expected N/A test_get_readable_files_in_glob_ignores_unreadable N/A N/A N/A N/A N/A fake_dir /fake/ N/A fake_file_contents N/A foo bar N/A expected N/A N/A N/A N/A os path join fake_dir a.json N/A N/A N/A os path join fake_dir c.json N/A file_mock N/A N/A mock MagicMock spec file N/A N/A N/A contextlib nested N/A N/A mock patch glob.glob autospec True return_value N/A /fake/b.json /fake/a.json /fake/c.json N/A N/A mock patch os.path.isfile autospec True return_value True N/A N/A mock patch os.access autospec True side_effect N/A True False True N/A N/A mock patch paasta_tools.utils.open create True return_value file_mock N/A N/A mock patch paasta_tools.utils.json.load autospec True return_value fake_file_contents N/A N/A N/A N/A N/A utils get_readable_files_in_glob fake_dir expected N/A test_get_readable_files_in_glob_is_lexicographic N/A N/A N/A N/A N/A fake_dir /fake/ N/A fake_file_contents N/A foo bar N/A expected N/A N/A N/A N/A os path join fake_dir a.json N/A N/A N/A os path join fake_dir b.json N/A file_mock N/A N/A mock MagicMock spec file N/A N/A N/A contextlib nested N/A N/A mock patch glob.glob autospec True return_value N/A /fake/b.json /fake/a.json N/A N/A mock patch os.path.isfile autospec True return_value True N/A N/A mock patch os.access autospec True return_value True N/A N/A mock patch paasta_tools.utils.open create True return_value file_mock N/A N/A mock patch paasta_tools.utils.json.load autospec True return_value fake_file_contents N/A N/A N/A N/A N/A utils get_readable_files_in_glob fake_dir expected N/A test_load_system_paasta_config N/A N/A N/A N/A N/A json_load_return_value N/A foo bar N/A expected N/A N/A utils SystemPaastaConfig json_load_return_value /some/fake/dir N/A file_mock N/A N/A mock MagicMock spec file N/A N/A N/A contextlib nested N/A N/A mock patch os.path.isdir return_value True N/A N/A mock patch os.access return_value True N/A N/A mock patch paasta_tools.utils.open create True return_value file_mock N/A N/A mock patch paasta_tools.utils.get_readable_files_in_glob autospec True return_value N/A /some/fake/dir/some_file.json N/A N/A mock patch paasta_tools.utils.json.load autospec True return_value json_load_return_value N/A os_is_dir_patch os_access_patch open_file_patch mock_get_readable_files_in_glob json_patch N/A N/A actual N/A N/A utils load_system_paasta_config N/A N/A actual expected N/A N/A N/A actual __class__ N/A expected __class__ N/A N/A N/A open_file_patch assert_any_call /some/fake/dir/some_file.json N/A N/A N/A json_patch assert_any_call N/A N/A file_mock __enter__ N/A N/A N/A json_patch call_count 1 N/A test_load_system_paasta_config_file_non_existent_dir N/A N/A N/A N/A N/A fake_path /var/dir_of_fake N/A N/A N/A contextlib nested N/A N/A mock patch os.path.isdir return_value False N/A isdir_patch N/A N/A N/A raises N/A utils PaastaNotConfiguredError excinfo N/A N/A N/A N/A utils load_system_paasta_config fake_path N/A expected N/A Could not find system paasta configuration directory: %s fake_path N/A N/A N/A str N/A excinfo value expected N/A test_load_system_paasta_config_file_non_readable_dir N/A N/A N/A N/A N/A fake_path /var/dir_of_fake N/A N/A N/A contextlib nested N/A N/A mock patch os.path.isdir return_value True N/A N/A mock patch os.access return_value False N/A isdir_patch access_patch N/A N/A N/A raises N/A utils PaastaNotConfiguredError excinfo N/A N/A N/A N/A utils load_system_paasta_config fake_path N/A expected N/A Could not read from system paasta configuration directory: %s fake_path N/A N/A N/A str N/A excinfo value expected N/A test_load_system_paasta_config_file_dne N/A N/A N/A N/A N/A fake_path /var/dir_of_fake N/A N/A N/A contextlib nested N/A N/A mock patch os.path.isdir return_value True N/A N/A mock patch os.access return_value True N/A N/A mock patch paasta_tools.utils.open create True side_effect N/A IOError 2 a b N/A N/A mock patch paasta_tools.utils.get_readable_files_in_glob autospec True return_value N/A fake_path N/A isdir_patch access_patch open_patch mock_get_readable_files_in_glob N/A N/A N/A raises N/A utils PaastaNotConfiguredError excinfo N/A N/A N/A N/A utils load_system_paasta_config fake_path N/A N/A N/A str N/A excinfo value Could not load system paasta config file b: a N/A test_load_system_paasta_config_merge_lexographically N/A N/A N/A N/A N/A fake_file_a N/A foo fake this value will be overriden fake_data N/A fake_file_b N/A foo overriding value N/A expected N/A N/A utils SystemPaastaConfig N/A foo fake overriding value fake_data /some/fake/dir N/A file_mock N/A N/A mock MagicMock spec file N/A N/A N/A contextlib nested N/A N/A mock patch os.path.isdir return_value True N/A N/A mock patch os.access return_value True N/A N/A mock patch paasta_tools.utils.open create True return_value file_mock N/A N/A mock patch paasta_tools.utils.get_readable_files_in_glob autospec True return_value N/A a b N/A N/A mock patch paasta_tools.utils.json.load autospec True side_effect N/A fake_file_a fake_file_b N/A os_is_dir_patch os_access_patch open_file_patch mock_get_readable_files_in_glob json_patch N/A N/A actual N/A N/A utils load_system_paasta_config N/A N/A actual expected N/A test_SystemPaastaConfig_get_cluster N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A cluster peanut /some/fake/dir N/A expected peanut N/A actual N/A N/A fake_config get_cluster N/A N/A actual expected N/A test_SystemPaastaConfig_get_cluster_dne N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A /some/fake/dir N/A N/A raises N/A utils PaastaNotConfiguredError N/A N/A N/A N/A fake_config get_cluster N/A test_SystemPaastaConfig_get_volumes N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A volumes N/A N/A fake_path fake_other_path /some/fake/dir N/A expected N/A N/A fake_path fake_other_path N/A actual N/A N/A fake_config get_volumes N/A N/A actual expected N/A test_SystemPaastaConfig_get_volumes_dne N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A /some/fake/dir N/A N/A raises N/A utils PaastaNotConfiguredError N/A N/A N/A N/A fake_config get_volumes N/A test_SystemPaastaConfig_get_zk N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A zookeeper zk://fake_zookeeper_host /some/fake/dir N/A expected fake_zookeeper_host N/A actual N/A N/A fake_config get_zk_hosts N/A N/A actual expected N/A test_SystemPaastaConfig_get_zk_dne N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A /some/fake/dir N/A N/A raises N/A utils PaastaNotConfiguredError N/A N/A N/A N/A fake_config get_zk_hosts N/A test_SystemPaastaConfig_get_registry N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A docker_registry fake_registry /some/fake/dir N/A expected fake_registry N/A actual N/A N/A fake_config get_docker_registry N/A N/A actual expected N/A test_SystemPaastaConfig_get_registry_dne N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A /some/fake/dir N/A N/A raises N/A utils PaastaNotConfiguredError N/A N/A N/A N/A fake_config get_docker_registry N/A test_SystemPaastaConfig_get_sensu_host_default N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A /some/fake/dir N/A actual N/A N/A fake_config get_sensu_host N/A expected localhost N/A N/A actual expected N/A test_SystemPaastaConfig_get_sensu_host N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A sensu_host blurp /some/fake/dir N/A actual N/A N/A fake_config get_sensu_host N/A expected blurp N/A N/A actual expected N/A test_SystemPaastaConfig_get_sensu_host_None N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A sensu_host None /some/fake/dir N/A actual N/A N/A fake_config get_sensu_host N/A expected None N/A N/A actual expected N/A test_SystemPaastaConfig_get_sensu_port_default N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A /some/fake/dir N/A actual N/A N/A fake_config get_sensu_port N/A expected 3030 N/A N/A actual expected N/A test_SystemPaastaConfig_get_sensu_port N/A N/A N/A N/A N/A fake_config N/A N/A utils SystemPaastaConfig N/A sensu_port 4040 /some/fake/dir N/A actual N/A N/A fake_config get_sensu_port N/A expected 4040 N/A N/A actual expected N/A test_atomic_file_write N/A N/A N/A N/A N/A N/A N/A mock patch tempfile.NamedTemporaryFile autospec True ntf_patch N/A N/A file_patch N/A N/A N/A ntf_patch __enter__ N/A N/A file_patch name /hurp/.durp-AAA N/A N/A N/A ntf_patch reset_mock N/A N/A N/A mock patch os.rename autospec True rename_patch N/A N/A N/A N/A mock patch os.chmod autospec True chmod_patch N/A N/A N/A N/A utils atomic_file_write /hurp/durp N/A N/A N/A N/A ntf_patch assert_called_once_with dir /hurp prefix .durp- delete False N/A N/A N/A chmod_patch assert_called_once_with /hurp/.durp-AAA N/A mock ANY N/A N/A N/A rename_patch assert_called_once_with /hurp/.durp-AAA /hurp/durp N/A test_atomic_file_write_itest N/A N/A N/A N/A N/A tempdir N/A N/A tempfile mkdtemp N/A target_file_name N/A N/A N/A os path join tempdir test_atomic_file_write_itest.txt N/A N/A N/A old_umask N/A N/A os umask 18 N/A N/A open target_file_name w f_before N/A N/A N/A N/A f_before write old content N/A N/A N/A utils atomic_file_write target_file_name f_new N/A N/A N/A N/A f_new write new content N/A N/A open target_file_name f_existing N/A N/A N/A N/A N/A f_existing read old content N/A N/A open target_file_name f_done N/A N/A N/A N/A N/A f_done read new content N/A file_stat N/A N/A os stat target_file_name N/A N/A N/A stat S_ISREG N/A file_stat st_mode N/A N/A N/A N/A stat S_IMODE N/A file_stat st_mode 420 N/A N/A N/A N/A os umask old_umask N/A N/A N/A shutil rmtree tempdir N/A test_configure_log N/A N/A N/A N/A N/A fake_log_writer N/A driver fake N/A N/A N/A mock patch paasta_tools.utils.load_system_paasta_config mock_load_system_paasta_config N/A N/A N/A N/A N/A mock_load_system_paasta_config get_log_writer return_value fake_log_writer N/A N/A N/A mock patch paasta_tools.utils.get_log_writer_class mock_get_log_writer_class N/A N/A N/A N/A utils configure_log N/A N/A N/A mock_get_log_writer_class assert_called_once_with fake N/A N/A N/A N/A mock_get_log_writer_class fake assert_called_once_with fake_log_writer N/A test_compose_job_id_without_hashes N/A N/A N/A N/A N/A fake_service my_cool_service N/A fake_instance main N/A expected my_cool_service.main N/A actual N/A N/A utils compose_job_id fake_service fake_instance N/A N/A actual expected N/A test_compose_job_id_with_git_hash N/A N/A N/A N/A N/A fake_service my_cool_service N/A fake_instance main N/A fake_git_hash git123abc N/A N/A raises N/A utils InvalidJobNameError N/A N/A N/A N/A utils compose_job_id fake_service fake_instance git_hash fake_git_hash N/A test_compose_job_id_with_config_hash N/A N/A N/A N/A N/A fake_service my_cool_service N/A fake_instance main N/A fake_config_hash config456def N/A N/A raises N/A utils InvalidJobNameError N/A N/A N/A N/A utils compose_job_id fake_service fake_instance config_hash fake_config_hash N/A test_compose_job_id_with_hashes N/A N/A N/A N/A N/A fake_service my_cool_service N/A fake_instance main N/A fake_git_hash git123abc N/A fake_config_hash config456def N/A expected my_cool_service.main.git123abc.config456def N/A actual N/A N/A utils compose_job_id fake_service fake_instance fake_git_hash fake_config_hash N/A N/A actual expected N/A test_decompose_job_id_too_short N/A N/A N/A N/A N/A N/A raises N/A utils InvalidJobNameError N/A N/A N/A N/A utils decompose_job_id foo N/A test_decompose_job_id_without_hashes N/A N/A N/A N/A N/A fake_job_id my_cool_service.main N/A expected N/A my_cool_service main None None N/A actual N/A N/A utils decompose_job_id fake_job_id N/A N/A actual expected N/A test_decompose_job_id_with_hashes N/A N/A N/A N/A N/A fake_job_id my_cool_service.main.git123abc.config456def N/A expected N/A my_cool_service main git123abc config456def N/A actual N/A N/A utils decompose_job_id fake_job_id N/A N/A actual expected N/A test_build_docker_tag N/A N/A mock_build_docker_image_name N/A N/A N/A upstream_job_name foo N/A upstream_git_commit bar N/A N/A mock_build_docker_image_name return_value fake-registry/services-foo N/A expected N/A fake-registry/services-foo:paasta-%s N/A upstream_git_commit N/A actual N/A N/A utils build_docker_tag upstream_job_name upstream_git_commit N/A N/A actual expected N/A N/A N/A mock patch paasta_tools.utils.build_docker_image_name test_check_docker_image_false N/A N/A mock_build_docker_image_name N/A N/A N/A N/A mock_build_docker_image_name return_value fake-registry/services-foo N/A fake_app fake_app N/A fake_commit fake_commit N/A docker_tag N/A N/A utils build_docker_tag fake_app fake_commit N/A N/A N/A mock patch docker.Client mock_docker N/A N/A docker_client N/A mock_docker return_value N/A N/A N/A docker_client images return_value N/A N/A Created VirtualSize ParentId RepoTags Id Size 1425430339 250344331 1111 N/A docker_tag ef978820f195dede62e206bbd41568463ab2b79260bc63835a72154fe7e196a2 0 N/A N/A N/A N/A utils check_docker_image test_service tag2 False N/A N/A N/A mock patch paasta_tools.utils.build_docker_image_name test_check_docker_image_true N/A N/A mock_build_docker_image_name N/A N/A N/A fake_app fake_app N/A fake_commit fake_commit N/A N/A mock_build_docker_image_name return_value fake-registry/services-foo N/A docker_tag N/A N/A utils build_docker_tag fake_app fake_commit N/A N/A N/A mock patch docker.Client mock_docker N/A N/A docker_client N/A mock_docker return_value N/A N/A N/A docker_client images return_value N/A N/A Created VirtualSize ParentId RepoTags Id Size 1425430339 250344331 1111 N/A docker_tag ef978820f195dede62e206bbd41568463ab2b79260bc63835a72154fe7e196a2 0 N/A N/A N/A N/A utils check_docker_image fake_app fake_commit True N/A N/A N/A mock patch paasta_tools.utils.build_docker_image_name test_remove_ansi_escape_sequences N/A N/A N/A N/A N/A plain_string blackandwhite N/A colored_string N/A N/A [34m plain_string [0m N/A N/A N/A N/A utils remove_ansi_escape_sequences colored_string plain_string N/A test_get_default_cluster_for_service N/A N/A N/A N/A N/A fake_service fake_service N/A fake_clusters N/A fake_cluster-1 fake_cluster-2 N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.list_clusters autospec True return_value fake_clusters N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True N/A mock_list_clusters mock_load_system_paasta_config N/A N/A N/A mock_load_system_paasta_config side_effect N/A utils PaastaNotConfiguredError N/A N/A N/A N/A utils get_default_cluster_for_service fake_service fake_cluster-1 N/A N/A N/A mock_list_clusters assert_called_once_with fake_service N/A test_get_default_cluster_for_service_empty_deploy_config N/A N/A N/A N/A N/A fake_service fake_service N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.list_clusters autospec True return_value N/A N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True N/A mock_list_clusters mock_load_system_paasta_config N/A N/A N/A mock_load_system_paasta_config side_effect N/A utils PaastaNotConfiguredError N/A N/A raises N/A utils NoConfigurationForServiceError N/A N/A N/A N/A utils get_default_cluster_for_service fake_service N/A N/A N/A mock_list_clusters assert_called_once_with fake_service N/A test_list_clusters_no_service_given_lists_all_of_them N/A N/A N/A N/A N/A fake_soa_dir /nail/etc/services N/A fake_cluster_configs N/A /nail/etc/services/service1/marathon-cluster1.yaml /nail/etc/services/service2/chronos-cluster2.yaml N/A expected N/A cluster1 cluster2 N/A N/A N/A contextlib nested N/A N/A mock patch os.path.join autospec True return_value N/A %s/* fake_soa_dir N/A N/A mock patch glob.glob autospec True return_value fake_cluster_configs N/A mock_join_path mock_glob N/A N/A actual N/A N/A utils list_clusters soa_dir fake_soa_dir N/A N/A actual expected N/A N/A N/A mock_join_path assert_called_once_with fake_soa_dir * N/A N/A N/A mock_glob assert_called_once_with N/A %s/*/*.yaml fake_soa_dir N/A test_list_clusters_with_service N/A N/A N/A N/A N/A fake_soa_dir /nail/etc/services N/A fake_service fake_service N/A fake_cluster_configs N/A /nail/etc/services/service1/marathon-cluster1.yaml /nail/etc/services/service1/chronos-cluster2.yaml N/A expected N/A cluster1 cluster2 N/A N/A N/A contextlib nested N/A N/A mock patch os.path.join autospec True return_value N/A %s/%s N/A fake_soa_dir fake_service N/A N/A mock patch glob.glob autospec True return_value fake_cluster_configs N/A mock_join_path mock_glob N/A N/A actual N/A N/A utils list_clusters fake_service fake_soa_dir N/A N/A actual expected N/A N/A N/A mock_join_path assert_called_once_with fake_soa_dir fake_service N/A N/A N/A mock_glob assert_called_once_with N/A %s/%s/*.yaml N/A fake_soa_dir fake_service N/A test_list_clusters_ignores_bogus_clusters N/A N/A N/A N/A N/A fake_soa_dir /nail/etc/services N/A fake_service fake_service N/A fake_cluster_configs N/A /nail/etc/services/service1/marathon-cluster1.yaml /nail/etc/services/service1/marathon-PROD.yaml /nail/etc/services/service1/chronos-cluster2.yaml /nail/etc/services/service1/chronos-SHARED.yaml N/A expected N/A cluster1 cluster2 N/A N/A N/A contextlib nested N/A N/A mock patch os.path.join autospec True return_value N/A %s/%s N/A fake_soa_dir fake_service N/A N/A mock patch glob.glob autospec True return_value fake_cluster_configs N/A mock_join_path mock_glob N/A N/A actual N/A N/A utils list_clusters service fake_service N/A N/A actual expected N/A test_list_all_instances_for_service N/A N/A N/A N/A N/A service fake_service N/A clusters N/A fake_cluster N/A mock_instances N/A N/A service instance1 N/A service instance2 N/A expected N/A set N/A instance1 instance2 N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.list_clusters autospec True N/A N/A mock patch paasta_tools.utils.get_service_instance_list autospec True N/A mock_list_clusters mock_service_instance_list N/A N/A N/A mock_list_clusters return_value clusters N/A N/A mock_service_instance_list return_value mock_instances N/A actual N/A N/A utils list_all_instances_for_service service N/A N/A actual expected N/A N/A N/A mock_list_clusters assert_called_once_with service soa_dir N/A mock ANY N/A N/A N/A mock_service_instance_list assert_called_once_with service N/A clusters N/A 0 None soa_dir N/A mock ANY N/A test_get_service_instance_list N/A N/A N/A N/A N/A fake_name hint N/A fake_instance_1 unsweet N/A fake_instance_2 water N/A fake_cluster 16floz N/A fake_dir /nail/home/hipster N/A fake_job_config N/A fake_instance_1 fake_instance_2 N/A N/A N/A expected N/A N/A fake_name fake_instance_1 N/A fake_name fake_instance_1 N/A fake_name fake_instance_2 N/A fake_name fake_instance_2 N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.service_configuration_lib.read_extra_service_information autospec True return_value fake_job_config N/A read_extra_info_patch N/A N/A actual N/A N/A utils get_service_instance_list fake_name fake_cluster soa_dir fake_dir N/A N/A N/A read_extra_info_patch assert_any_call fake_name marathon-16floz soa_dir fake_dir N/A N/A N/A read_extra_info_patch assert_any_call fake_name chronos-16floz soa_dir fake_dir N/A N/A N/A read_extra_info_patch call_count 2 N/A N/A N/A sorted expected N/A sorted actual N/A test_get_services_for_cluster N/A N/A N/A N/A N/A cluster honey_bunches_of_oats N/A soa_dir completely_wholesome N/A instances N/A N/A this_is_testing all_the_things N/A my_nerf_broke N/A expected N/A my_nerf_broke this_is_testing all_the_things N/A N/A N/A contextlib nested N/A N/A mock patch os.path.abspath autospec True return_value chex_mix N/A N/A mock patch os.listdir autospec True return_value N/A dir1 dir2 N/A N/A mock patch paasta_tools.utils.get_service_instance_list side_effect N/A N/A N/A a b c d N/A N/A N/A instances pop N/A abspath_patch listdir_patch get_instances_patch N/A N/A actual N/A N/A utils get_services_for_cluster cluster soa_dir soa_dir N/A N/A expected actual N/A N/A N/A abspath_patch assert_called_once_with soa_dir N/A N/A N/A listdir_patch assert_called_once_with chex_mix N/A N/A N/A get_instances_patch assert_any_call dir1 cluster None soa_dir N/A N/A N/A get_instances_patch assert_any_call dir2 cluster None soa_dir N/A N/A N/A get_instances_patch call_count 2 N/A test_color_text N/A N/A N/A N/A N/A expected N/A %shi%s N/A N/A N/A utils PaastaColors RED N/A N/A utils PaastaColors DEFAULT N/A actual N/A N/A N/A utils PaastaColors color_text N/A N/A utils PaastaColors RED hi N/A N/A actual expected N/A test_color_text_nested N/A N/A N/A N/A N/A expected N/A %sred%sblue%sred%s N/A N/A N/A utils PaastaColors RED N/A N/A utils PaastaColors BLUE N/A N/A N/A utils PaastaColors DEFAULT N/A N/A utils PaastaColors RED N/A N/A utils PaastaColors DEFAULT N/A actual N/A N/A N/A utils PaastaColors color_text N/A N/A utils PaastaColors RED N/A red%sred N/A N/A N/A utils PaastaColors blue blue N/A N/A actual expected N/A test_DeploymentsJson_read N/A N/A N/A N/A N/A file_mock N/A N/A mock MagicMock spec file N/A fake_dir /var/dir_of_fake N/A fake_path /var/dir_of_fake/fake_service/deployments.json N/A fake_json N/A v1 N/A no_srv:blaster dont_care:about N/A docker_image desired_state force_bounce test_rocker:9.9 start None N/A docker_image desired_state force_bounce this:guy stop 12345 N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.open create True return_value file_mock N/A N/A mock patch json.load autospec True return_value fake_json N/A N/A mock patch paasta_tools.utils.os.path.isfile autospec True return_value True N/A open_patch json_patch isfile_patch N/A N/A actual N/A N/A utils load_deployments_json fake_service fake_dir N/A N/A N/A open_patch assert_called_once_with fake_path N/A N/A N/A json_patch assert_called_once_with N/A N/A file_mock __enter__ N/A N/A actual N/A fake_json N/A v1 N/A test_get_docker_url_no_error N/A N/A N/A N/A N/A fake_registry im.a-real.vm N/A fake_image and-i-can-run:1.0 N/A expected N/A %s/%s N/A fake_registry fake_image N/A N/A N/A N/A utils get_docker_url fake_registry fake_image expected N/A test_get_docker_url_with_no_docker_image N/A N/A N/A N/A N/A N/A raises N/A utils NoDockerImageError N/A N/A N/A N/A utils get_docker_url fake_registry None N/A test_get_running_mesos_docker_containers N/A N/A N/A N/A N/A fake_container_data N/A N/A Status Names Id Up 2 hours N/A /mesos-legit.e1ad42eb-3ed7-4c9b-8711-aff017ef55a5 05698f4156c4f30c8dcd747f7724b14c9af7771c9a4b96fdd6aa37d6419a12a3 N/A Status Names Id Up 3 days N/A /definitely_not_meeeeesos-.6d2fb3aa-2fef-4f98-8fed-df291481e91f ae66e2c3fe3c4b2a7444212592afea5cc6a4d8ca70ee595036b19949e00a257c N/A N/A N/A mock patch paasta_tools.utils.get_docker_client mock_docker N/A N/A docker_client N/A mock_docker return_value N/A N/A N/A docker_client containers return_value fake_container_data N/A N/A N/A len N/A N/A utils get_running_mesos_docker_containers 1 N/A test_run_cancels_timer_thread_on_keyboard_interrupt N/A N/A N/A N/A N/A mock_process N/A N/A mock Mock N/A mock_timer_object N/A N/A mock Mock N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.Popen autospec True return_value mock_process N/A N/A mock patch paasta_tools.utils.threading.Timer autospec True return_value mock_timer_object N/A mock_popen mock_timer N/A N/A N/A N/A N/A mock_process stdout readline side_effect KeyboardInterrupt N/A N/A raises KeyboardInterrupt N/A N/A N/A N/A utils _run sh echo foo timeout 10 N/A N/A N/A N/A mock_timer_object cancel call_count 1 N/A test_run_returns_when_popen_fails N/A N/A N/A N/A N/A fake_exception N/A OSError 1234 fake error N/A N/A N/A mock patch paasta_tools.utils.Popen autospec True side_effect fake_exception N/A N/A N/A return_code output N/A N/A utils _run nonexistant command timeout 10 N/A N/A return_code 1234 N/A N/A fake error output N/A TestInstanceConfig N/A N/A test_get_monitoring N/A N/A self N/A N/A N/A fake_info fake_info N/A N/A N/A N/A N/A N/A utils InstanceConfig service cluster instance config_dict N/A monitoring fake_info branch_dict N/A get_monitoring fake_info N/A test_get_cpus_in_config N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A cpus -5 branch_dict N/A N/A N/A N/A N/A fake_conf get_cpus -5 N/A test_get_cpus_in_config_float N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A cpus 0.66 branch_dict N/A N/A N/A N/A N/A fake_conf get_cpus 0.66 N/A test_get_cpus_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_cpus 0.25 N/A test_get_mem_in_config N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service instance cluster config_dict N/A mem -999 branch_dict N/A N/A N/A N/A N/A fake_conf get_mem -999 N/A test_get_mem_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service instance cluster config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_mem 1024 N/A test_get_mem_swap_int N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service instance cluster config_dict N/A mem 50 branch_dict N/A N/A N/A N/A N/A fake_conf get_mem_swap 50m N/A test_get_mem_swap_float_rounds_up N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service instance cluster config_dict N/A mem 50.4 branch_dict N/A N/A N/A N/A N/A fake_conf get_mem_swap 51m N/A test_get_disk_in_config N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service instance cluster config_dict N/A disk -999 branch_dict N/A N/A N/A N/A N/A fake_conf get_disk -999 N/A test_get_disk_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service instance cluster config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_disk 1024 N/A test_deploy_group_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service instance fake_instance cluster fake_cluster config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_deploy_group fake_cluster.fake_instance N/A test_deploy_group_if_config N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service instance cluster config_dict N/A deploy_group fake_deploy_group branch_dict N/A N/A N/A N/A N/A fake_conf get_deploy_group fake_deploy_group N/A test_deploy_group_string_interpolation N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service instance cluster fake_cluster config_dict N/A deploy_group cluster_is_{cluster} branch_dict N/A N/A N/A N/A N/A fake_conf get_deploy_group cluster_is_fake_cluster N/A test_get_cmd_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_cmd None N/A test_get_cmd_in_config N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A cmd FAKECMD branch_dict N/A N/A N/A N/A N/A fake_conf get_cmd FAKECMD N/A test_get_env_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service fake_service cluster fake_cluster instance fake_instance config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_env N/A PAASTA_SERVICE PAASTA_INSTANCE PAASTA_CLUSTER fake_service fake_instance fake_cluster N/A test_get_env_with_config N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A env N/A SPECIAL_ENV TRUE branch_dict N/A N/A N/A N/A N/A fake_conf get_env N/A SPECIAL_ENV PAASTA_SERVICE PAASTA_INSTANCE PAASTA_CLUSTER TRUE N/A test_get_args_default_no_cmd N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_args N/A N/A test_get_args_default_with_cmd N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A cmd FAKECMD branch_dict N/A N/A N/A N/A N/A fake_conf get_args None N/A test_get_args_in_config N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A args N/A arg1 arg2 branch_dict N/A N/A N/A N/A N/A fake_conf get_args N/A arg1 arg2 N/A test_get_args_in_config_with_cmd N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A args cmd N/A A C branch_dict N/A N/A N/A N/A fake_conf get_cmd N/A N/A raises N/A utils InvalidInstanceConfig N/A N/A N/A N/A fake_conf get_args N/A test_get_force_bounce N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A branch_dict N/A force_bounce blurp N/A N/A N/A N/A fake_conf get_force_bounce blurp N/A test_get_desired_state N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A branch_dict N/A desired_state stop N/A N/A N/A N/A fake_conf get_desired_state stop N/A test_monitoring_blacklist_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_monitoring_blacklist N/A N/A test_monitoring_blacklist_defaults_to_deploy_blacklist N/A N/A self N/A N/A N/A fake_deploy_blacklist N/A N/A region fake_region N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A deploy_blacklist fake_deploy_blacklist branch_dict N/A N/A N/A N/A N/A fake_conf get_monitoring_blacklist fake_deploy_blacklist N/A test_deploy_blacklist_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_deploy_blacklist N/A N/A test_deploy_blacklist_reads_blacklist N/A N/A self N/A N/A N/A fake_deploy_blacklist N/A N/A region fake_region N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A deploy_blacklist fake_deploy_blacklist branch_dict N/A N/A N/A N/A N/A fake_conf get_deploy_blacklist fake_deploy_blacklist N/A test_extra_volumes_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_extra_volumes N/A N/A test_extra_volumes_normal N/A N/A self N/A N/A N/A fake_extra_volumes N/A N/A containerPath hostPath mode /etc/a /var/data/a RO N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A extra_volumes fake_extra_volumes branch_dict N/A N/A N/A N/A N/A fake_conf get_extra_volumes fake_extra_volumes N/A test_get_pool N/A N/A self N/A N/A N/A pool poolname N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A pool pool branch_dict N/A N/A N/A N/A N/A fake_conf get_pool pool N/A test_get_pool_default N/A N/A self N/A N/A N/A fake_conf N/A N/A utils InstanceConfig service cluster instance config_dict N/A branch_dict N/A N/A N/A N/A N/A fake_conf get_pool default N/A N/A test_is_under_replicated_ok N/A N/A N/A N/A N/A num_available 1 N/A expected_count 1 N/A crit_threshold 50 N/A actual N/A N/A utils is_under_replicated num_available expected_count crit_threshold N/A N/A actual N/A False N/A float 100 N/A test_is_under_replicated_zero N/A N/A N/A N/A N/A num_available 1 N/A expected_count 0 N/A crit_threshold 50 N/A actual N/A N/A utils is_under_replicated num_available expected_count crit_threshold N/A N/A actual N/A False N/A float 100 N/A test_is_under_replicated_critical N/A N/A N/A N/A N/A num_available 0 N/A expected_count 1 N/A crit_threshold 50 N/A actual N/A N/A utils is_under_replicated num_available expected_count crit_threshold N/A N/A actual N/A True N/A float 0 N/A test_deploy_blacklist_to_constraints N/A N/A N/A N/A N/A fake_deploy_blacklist N/A N/A region useast1-prod N/A habitat fake_habitat N/A expected_constraints N/A N/A region UNLIKE useast1-prod N/A habitat UNLIKE fake_habitat N/A actual N/A N/A utils deploy_blacklist_to_constraints fake_deploy_blacklist N/A N/A actual expected_constraints N/A test_validate_service_instance_valid_marathon N/A N/A N/A N/A N/A mock_marathon_services N/A N/A service1 main N/A service2 main N/A mock_chronos_services N/A N/A service1 worker N/A service2 tailer N/A my_service service1 N/A my_instance main N/A fake_cluster fake_cluster N/A fake_soa_dir fake_soa_dir N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.get_services_for_cluster autospec True side_effect N/A mock_marathon_services mock_chronos_services N/A get_services_for_cluster_patch N/A N/A N/A N/A N/A utils validate_service_instance my_service my_instance fake_cluster fake_soa_dir marathon N/A N/A N/A N/A mock call cluster fake_cluster instance_type marathon soa_dir fake_soa_dir N/A get_services_for_cluster_patch call_args_list N/A test_validate_service_instance_valid_chronos N/A N/A N/A N/A N/A mock_marathon_services N/A N/A service1 main N/A service2 main N/A mock_chronos_services N/A N/A service1 worker N/A service2 tailer N/A my_service service1 N/A my_instance worker N/A fake_cluster fake_cluster N/A fake_soa_dir fake_soa_dir N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.get_services_for_cluster autospec True side_effect N/A mock_marathon_services mock_chronos_services N/A get_services_for_cluster_patch N/A N/A N/A N/A N/A utils validate_service_instance my_service my_instance fake_cluster fake_soa_dir chronos N/A N/A N/A N/A mock call cluster fake_cluster instance_type chronos soa_dir fake_soa_dir N/A get_services_for_cluster_patch call_args_list N/A test_validate_service_instance_invalid N/A N/A N/A N/A N/A mock_marathon_services N/A N/A service1 main N/A service2 main N/A mock_chronos_services N/A N/A service1 worker N/A service2 tailer N/A my_service bad_service N/A my_instance main N/A fake_cluster fake_cluster N/A fake_soa_dir fake_soa_dir N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.get_services_for_cluster autospec True side_effect N/A mock_marathon_services mock_chronos_services N/A N/A mock patch sys.exit N/A get_services_for_cluster_patch sys_exit_patch N/A N/A N/A N/A utils validate_service_instance my_service my_instance fake_cluster fake_soa_dir N/A N/A N/A sys_exit_patch assert_called_once_with 3 N/A test_terminal_len N/A N/A N/A N/A N/A N/A N/A len some text N/A N/A utils terminal_len N/A N/A N/A utils PaastaColors red some text N/A test_format_table N/A N/A N/A N/A N/A actual N/A N/A utils format_table N/A N/A looooong y z N/A a looooong c N/A j k looooong N/A expected N/A looooong  y         z a         looooong  c j         k         looooong N/A N/A actual expected N/A N/A N/A a     b     c N/A N/A utils format_table N/A N/A a b c min_spacing 5 N/A test_format_table_with_interjected_lines N/A N/A N/A N/A N/A actual N/A N/A utils format_table N/A N/A looooong y z interjection N/A a looooong c unicode interjection N/A j k looooong N/A expected N/A looooong  y         z interjection a         looooong  c unicode interjection j         k         looooong N/A N/A actual expected N/A test_format_table_all_strings N/A N/A N/A N/A N/A actual N/A N/A utils format_table N/A foo bar baz N/A expected N/A foo bar baz N/A N/A actual expected N/A test_parse_timestamp N/A N/A N/A N/A N/A actual N/A N/A utils parse_timestamp 19700101T000000 N/A expected N/A N/A datetime datetime year 1970 month 1 day 1 hour 0 minute 0 second 0 N/A N/A actual expected N/A test_null_log_writer N/A N/A N/A N/A N/A Basic smoke test for NullLogWriter N/A lw N/A N/A utils NullLogWriter driver null N/A N/A N/A lw log fake_service fake_line build BOGUS_LEVEL N/A TestFileLogWriter N/A N/A test_smoke N/A N/A self N/A N/A N/A Smoke test for FileLogWriter N/A fw N/A N/A utils FileLogWriter /dev/null N/A N/A N/A fw log fake_service fake_line build BOGUS_LEVEL N/A test_format_path N/A N/A self N/A N/A N/A Test the path formatting for FileLogWriter N/A fw N/A N/A utils FileLogWriter /logs/{service}/{component}/{level}/{cluster}/{instance} N/A expected /logs/a/b/c/d/e N/A N/A expected N/A N/A fw format_path a b c d e N/A test_maybe_flock N/A N/A self N/A N/A N/A Make sure we flock and unflock when flock=True N/A N/A N/A mock patch paasta_tools.utils.fcntl mock_fcntl N/A N/A fw N/A N/A utils FileLogWriter /dev/null flock True N/A mock_file N/A N/A mock Mock N/A N/A N/A fw maybe_flock mock_file N/A N/A N/A N/A N/A mock_fcntl flock assert_called_once_with mock_file N/A mock_fcntl LOCK_EX N/A N/A N/A N/A mock_fcntl flock reset_mock N/A N/A N/A N/A mock_fcntl flock assert_called_once_with mock_file N/A mock_fcntl LOCK_UN N/A test_maybe_flock_flock_false N/A N/A self N/A N/A N/A Make sure we don't flock/unflock when flock=False N/A N/A N/A mock patch paasta_tools.utils.fcntl mock_fcntl N/A N/A fw N/A N/A utils FileLogWriter /dev/null flock False N/A mock_file N/A N/A mock Mock N/A N/A N/A fw maybe_flock mock_file N/A N/A N/A N/A N/A mock_fcntl flock call_count 0 N/A N/A N/A N/A mock_fcntl flock call_count 0 N/A test_log_makes_exactly_one_write_call N/A N/A self N/A N/A N/A We want to make sure that log() makes exactly one call to write, since that's how we ensure atomicity. N/A fake_file N/A N/A mock Mock N/A fake_contextmgr N/A N/A mock Mock __enter__ N/A N/A N/A _self N/A fake_file __exit__ N/A N/A N/A _self t v tb N/A None N/A fake_line N/A text 1000000 N/A N/A N/A mock patch paasta_tools.utils.io.FileIO return_value fake_contextmgr autospec True mock_FileIO N/A N/A fw N/A N/A utils FileLogWriter /dev/null flock False N/A N/A N/A mock patch paasta_tools.utils.format_log_line return_value fake_line autospec True fake_fll N/A N/A N/A N/A fw log service line component level level cluster cluster instance instance N/A N/A N/A fake_fll assert_called_once_with level cluster service instance component line N/A N/A N/A mock_FileIO assert_called_once_with /dev/null mode N/A fw mode closefd True N/A N/A N/A N/A fake_file write assert_called_once_with N/A %s
 fake_line N/A N/A test_deep_merge_dictionaries N/A N/A N/A N/A N/A overrides N/A common_key common_dict just_in_overrides just_in_overrides_dict overwriting_key overwriting_dict value N/A subkey1 subkey2 subkey3 1 2 3 value N/A key value value N/A test value N/A defaults N/A common_key common_dict just_in_defaults just_in_defaults_dict overwriting_key overwriting_dict overwritten_value N/A subkey1 subkey4 subkey5 overwritten_value 4 5 value N/A key value N/A overwritten-key overwritten-value overwritten-value N/A expected N/A common_key common_dict just_in_overrides just_in_overrides_dict just_in_defaults just_in_defaults_dict overwriting_key overwriting_dict value N/A subkey1 subkey2 subkey3 subkey4 subkey5 1 2 3 4 5 value N/A key value value N/A key value value N/A test value N/A N/A N/A N/A utils deep_merge_dictionaries overrides defaults expected N/A