Esempio n. 1
0
 def test_should_identify_and_unindent_basic_json(self):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent(
         '{\n\t"hello": "world",\n\t"value": 123\n}')
     expect(formattedText).to_equal('{"hello":"world","value":123}')
Esempio n. 2
0
 def test_should_identify_and_unindent_basic_xml(self):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent(
         '<root>\n\t<child\na="123"></child>\n</root>')
     expect(formattedText).to_equal('<root><child a="123"></child></root>')
Esempio n. 3
0
 def test_should_identify_and_unindent_basic_json(self):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent('{\n\t"hello": "world",\n\t"value": 123\n}')
     expect(formattedText).to_equal('{"hello":"world","value":123}')
Esempio n. 4
0
 def format(self, text, options):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent(text)
     return formattedText
Esempio n. 5
0
 def test_should_identify_and_unindent_basic_xml(self):
     formatter = GeneralFormatter()
     formattedText = formatter.unindent('<root>\n\t<child\na="123"></child>\n</root>')
     expect(formattedText).to_equal('<root><child a="123"></child></root>')