Example #1
0
 def test_valid_xml_parser(self,url):
     '''test xml parser method with valid xml'''
     time.sleep(2)
     test_obj = GoodreadsAPIClient(url=url)
     try:
         test_obj.url_validator()
         test_obj.service_caller()
         test_obj.xml_parser()
     except InvalidGoodreadsURL:
         assert False
     except ServiceCallException:
         assert False
     else:
         self.assertIsInstance(test_obj._out, dict)
Example #2
0
 def test_invalid_xml_parser(self,service_content):
     '''test xml parser method with invalid xml'''
     test_obj = GoodreadsAPIClient(service_content=service_content)
     test_obj.xml_parser()
     assert test_obj._out == {}