Ejemplo n.º 1
0
	def test_parse_json_either(self):
		""" Tests that either parse can be used interchangeaby """
		assert len(api.parse_json_field('[1,2,3,4,5]')) == 5
		self.assertEqual(api.parse_json_list_field('{"hi":"yo"}')['hi'], 'yo')
Ejemplo n.º 2
0
	def test_parse_json_list_field_nonbool(self):
		""" Tests that JSON parsed correctly """
		assert len(api.parse_json_list_field('[1,2,3,4,5]')) == 5
Ejemplo n.º 3
0
	def test_parse_json_list_field(self):
		""" Tests taht bool 'parsed' correctly """
		self.assertFalse(api.parse_json_list_field('false'))
		self.assertTrue(api.parse_json_list_field('true'))
Ejemplo n.º 4
0
 def test_parse_json_either(self):
     """ Tests that either parse can be used interchangeaby """
     assert len(api.parse_json_field('[1,2,3,4,5]')) == 5
     self.assertEqual(api.parse_json_list_field('{"hi":"yo"}')['hi'], 'yo')
Ejemplo n.º 5
0
 def test_parse_json_list_field_nonbool(self):
     """ Tests that JSON parsed correctly """
     assert len(api.parse_json_list_field('[1,2,3,4,5]')) == 5
Ejemplo n.º 6
0
 def test_parse_json_list_field(self):
     """ Tests taht bool 'parsed' correctly """
     self.assertFalse(api.parse_json_list_field('false'))
     self.assertTrue(api.parse_json_list_field('true'))