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')
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
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'))