def test_get_contractors(self): """Returns the first 1,000 licensed contractors """ response = li.get_contractors() self.assertEqual(type(response['results']), list) self.assertEqual(len(response['results']), 1000) for result in response['results']: self.assertTrue('licensed_contractor_id' 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)