Beispiel #1
0
 def test_to_string_when_no_json(self):
     option = ListOption(parse_json=False)
     result = option.to_string(['1', '2', '3'])
     self.assertEqual(result, "['1', '2', '3']")
Beispiel #2
0
 def test_to_string_when_json(self):
     option = ListOption()
     result = option.to_string(['1', '2', '3'])
     self.assertEqual(result, '["1", "2", "3"]')
     self.assertNotEqual(result, "['1', '2', '3']")
Beispiel #3
0
 def test_to_string_when_no_json(self):
     option = ListOption(parse_json=False)
     result = option.to_string(['1', '2', '3'])
     self.assertEqual(result, "['1', '2', '3']")
Beispiel #4
0
 def test_to_string_when_no_json(self):
     option = ListOption(parse_json=False)
     result = option.to_string(['1', '2', '3'])
     expected = [text_type(x) for x in [1, 2, 3]]
     self.assertEqual(result, text_type(expected))
Beispiel #5
0
 def test_to_string_when_json(self):
     option = ListOption()
     result = option.to_string(['1', '2', '3'])
     self.assertEqual(result, '["1", "2", "3"]')
     self.assertNotEqual(result, "['1', '2', '3']")