#NEWLINE# def test_print_dict_string_custom_headers( self ) : #NEWLINE# #INDENT# orig = sys . stdout #NEWLINE# sys . stdout = six . StringIO ( ) #NEWLINE# cliutils . print_dict ( { #NEWLINE# #INDENT# 'K' : 'k' , #NEWLINE# 'Key' : 'Value' , #NEWLINE# #UNINDENT# } , dict_property = 'Foo' , dict_value = 'Bar' ) #NEWLINE# out = sys . stdout . getvalue ( ) #NEWLINE# sys . stdout . close ( ) #NEWLINE# sys . stdout = orig #NEWLINE# expected = '+-----+-------+\n| Foo | Bar   |\n+-----+-------+\n| K   | k     |\n| Key | Value |\n+-----+-------+\n' #NEWLINE# self . assertEqual ( expected , expected )