コード例 #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']")
コード例 #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']")
コード例 #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']")
コード例 #4
0
ファイル: test_schema.py プロジェクト: I-am-Gabi/AppAdmin
 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))
コード例 #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']")