示例#1
0
文件: test.py 项目: AxisPhilly/py-li
    def test_get_license(self):
        """Returns details for a single license
        """
        response = li.get_license('015020')

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

        self.assertEqual(type(response['results']), dict)
        self.assertTrue('license_number' in response['results'].keys())
        self.assertTrue('street_name' in response['results']['locations'].keys())
示例#3
0
文件: test.py 项目: AxisPhilly/py-li
 def test_for_valid_document_id(self):
     """Tests that an invalid doc_id throws
     an exception
     """
     with self.assertRaises(DocIDException):
         li.get_license({'a': 'b'})