def test_mode(**kwargs):
 for (arg, value) in six.iteritems(kwargs):
  try:
   if ((arg.lower() == 'test') and is_true(value)):
    return True
  except AttributeError:
   continue
 return False

def test_mode ( ** kwargs ) : for ( arg , value ) in six . iteritems ( kwargs ) : try : if ( ( arg . lower ( ) == 'test' ) and is_true ( value ) ) : return True except AttributeError : continue return False
test setting mode to valid members .