diff --git a/adsdocmatch/tests/unittests/test_oracle_util.py b/adsdocmatch/tests/unittests/test_oracle_util.py index 00a98a0..00e0355 100644 --- a/adsdocmatch/tests/unittests/test_oracle_util.py +++ b/adsdocmatch/tests/unittests/test_oracle_util.py @@ -570,6 +570,17 @@ def test_query(self): # remove temp files os.remove(tmp_output_filename) + def test_cleanup(self): + """ """ + with mock.patch('requests.get') as mock_oracle_util: + mock_oracle_util.return_value = mock_response = mock.Mock() + mock_response.status_code = 200 + result = self.match_metadata.ORACLE_UTIL.cleanup_db() + self.assertEqual(result, None) + mock_response.status_code = 403 + result = self.match_metadata.ORACLE_UTIL.cleanup_db() + self.assertEqual(result, None) + if __name__ == '__main__': unittest.main()