From e8ea1104a7ec1775350d881d3f5eed9fb420b38e Mon Sep 17 00:00:00 2001 From: E Rasche Date: Mon, 21 Aug 2017 14:19:01 +0200 Subject: [PATCH] add a test expecting failure --- .../integration/test_upload_configuration_options.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/integration/test_upload_configuration_options.py b/test/integration/test_upload_configuration_options.py index b43c12cba84..1e88759cefd 100644 --- a/test/integration/test_upload_configuration_options.py +++ b/test/integration/test_upload_configuration_options.py @@ -127,3 +127,15 @@ class AutoDecompressTestCase(BaseCheckUploadContentConfigurationTestCase): ) dataset = self.dataset_populator.get_history_dataset_details(self.history_id, dataset=dataset) assert dataset["file_ext"] == "sam", dataset + + +class LocalAddressWhitelisting(BaseCheckUploadContentConfigurationTestCase): + + def test_external_url(self): + payload = self.dataset_populator.upload_payload( + self.history_id, 'http://localhost/', ext="txt" + ) + create_response = self._post("tools", data=payload) + # Ideally this would be 403 but the tool API endpoint isn't using + # the newer API decorator that handles those details. + assert create_response.status_code >= 400