def test_get_licenses(self): """Returns the first 1,000 most recent licenses """ response = li.get_licenses() self.assertEqual(type(response['results']), list) self.assertEqual(len(response['results']), 1000) for result in response['results']: self.assertTrue('license_number' in result.keys())
def test_top_param(self): """The $top query parameter limits the request results to the number value of $top """ response = li.get_permits(top=10) self.assertEqual(len(response['results']), 10) response = li.get_licenses(top=140) self.assertEqual(len(response['results']), 140) response = li.get_contractors(top=0) self.assertEqual(len(response['results']), 0)