Open marlycormar opened 5 years ago
Issue is rooted here: https://github.com/ctsit/redcap_deployment/blob/602cb1d26efd8a22c0ae0c841d11e3f5ddcf813f/tests/test.py#L75-L80
If the 501 error is the desired result, replace self.assertIn(expected_string, self.weburl.get(self.fullpath))
with the following:
with self.assertRaises(urllib.error.HTTPError) as cm:
self.weburl.get(self.fullpath)
# self.assertEqual(cm.exception, "HTTP Error 501: 'Not Implemented'")
# Causes below error
# AssertionError: <HTTPError 501: 'Not Implemented'> != "HTTP Error 501: 'Not Implemented'"
Given the importance of the API for ETLs, I may make a PR to add an API request test.