#NEWLINE# @ pytest . mark . parametrize ( 'role,serverstate' , [ ( 'control' , True ) , ( 'worker' , False ) , ( 'none' , False ) ] ) #NEWLINE# def test_attrs( calculate_mantl_vars , role , serverstate ) : #NEWLINE# #INDENT# mirrorer = mirror ( ( '' , { #NEWLINE# #INDENT# 'role' : role , #NEWLINE# #UNINDENT# } , [ ] ) ) #NEWLINE# func = calculate_mantl_vars ( mirrorer ) #NEWLINE# ( _ , attrs , _ ) = func ( ) #NEWLINE# assert ( 'consul_is_server' in attrs ) #NEWLINE# assert ( attrs [ 'consul_is_server' ] == serverstate )