From 6e3ae3b82c37daa7573dcb490178f15d0fffc6ce Mon Sep 17 00:00:00 2001
From: Brandon Hewer <brandon.hewer@stfc.ac.uk>
Date: Thu, 12 Jul 2018 16:21:21 +0100
Subject: [PATCH] Set facility to ISIS for relevant tests

Refs #21508
---
 .../ISISIndirectDiffractionReductionTest.py               | 8 ++++++++
 .../WorkflowAlgorithms/VesuvioDiffractionReductionTest.py | 7 +++++++
 2 files changed, 15 insertions(+)

diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReductionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReductionTest.py
index 1c34238176a..8cbdc0ad2f8 100644
--- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReductionTest.py
+++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReductionTest.py
@@ -9,6 +9,14 @@ from mantid.kernel import config
 
 
 class ISISIndirectDiffractionReductionTest(unittest.TestCase):
+
+    def setUp(self):
+        self._oldFacility = mantid.config['default.facility']
+        mantid.config.setFacility('ISIS')
+
+    def tearDown(self):
+        mantid.config.setFacility(self._oldFacility)
+
     def test_basic_reduction_completes(self):
         """
         Sanity test to ensure the most basic reduction actually completes.
diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReductionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReductionTest.py
index 77c4a663513..f1fa8e80db4 100644
--- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReductionTest.py
+++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReductionTest.py
@@ -8,6 +8,13 @@ from mantid.api import *
 
 class VesuvioDiffractionReductionTest(unittest.TestCase):
 
+    def setUp(self):
+        self._oldFacility = mantid.config['default.facility']
+        mantid.config.setFacility('ISIS')
+
+    def tearDown(self):
+        mantid.config.setFacility(self._oldFacility)
+
     def test_basic_reduction_completes(self):
         """
         Sanity test to ensure the most basic reduction actually completes.
-- 
GitLab