示例#1
0
文件: test.py 项目: AxisPhilly/py-li
    def test_get_location(self):
        """Returns details for a single location
        """
        response = li.get_location('333710')

        self.assertEqual(type(response['results']), dict)
        self.assertTrue('location_id' in response['results'].keys())
示例#2
0
文件: test.py 项目: AxisPhilly/py-li
    def test_get_location_with_related(self):
        """Returns details for a specific locations,
        with the related documents retrieved
        """
        response = li.get_location('333710', related=True)

        self.assertEqual(type(response['results']), dict)
        self.assertTrue('location_id' in response['results'].keys())
        self.assertTrue('results' in response['results']['zoningboardappeals'].keys())
        self.assertTrue('results' in response['results']['lireviewboardappeals'].keys())
        self.assertTrue('results' in response['results']['buildingboardappeals'].keys())
        self.assertTrue('results' in response['results']['appealhearings'].keys())
        self.assertTrue('results' in response['results']['cases'].keys())
        self.assertTrue('results' in response['results']['permits'].keys())
        self.assertTrue('results' in response['results']['licenses'].keys())
        self.assertTrue('results' in response['results']['violationdetails'].keys())