Index: src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -3,5 +3,5 @@
 
 import numpy
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingOptionsTest.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingOptionsTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingOptionsTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,5 +6,5 @@
 from PyQt4 import QtWebKit
 
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,5 +6,5 @@
 from PyQt4 import QtTest
 from PyQt4 import QtCore
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py	(revision c7358b24e5032be5648d823d4c423fe8a39ef5b0)
+++ src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,5 +6,5 @@
 from PyQt4 import QtTest
 from PyQt4 import QtCore
-from mock import MagicMock
+from unittest.mock import MagicMock
 from twisted.internet import threads
 
@@ -60,5 +60,5 @@
 
         #Test loading from json categories
-        category_list = fittingWindow.master_category_dict.keys()
+        category_list = list(fittingWindow.master_category_dict.keys())
 
         for category in category_list:
@@ -93,12 +93,12 @@
         fittingWindow.SASModelToQModel("cylinder")
         pd_index = fittingWindow.lstPoly.model().index(0,0)
-        self.assertEqual(str(pd_index.data().toString()), "Distribution of radius")
+        self.assertEqual(str(pd_index.data()), "Distribution of radius")
         pd_index = fittingWindow.lstPoly.model().index(1,0)
-        self.assertEqual(str(pd_index.data().toString()), "Distribution of length")
+        self.assertEqual(str(pd_index.data()), "Distribution of length")
 
         # test the delegate a bit
         delegate = fittingWindow.lstPoly.itemDelegate()
         self.assertEqual(len(delegate.POLYDISPERSE_FUNCTIONS), 5)
-        self.assertEqual(delegate.editableParameters(), [2, 3, 4, 5])
+        self.assertEqual(delegate.editableParameters(), [1, 2, 3, 4, 5])
         self.assertEqual(delegate.poly_function, 6)
         self.assertIsInstance(delegate.combo_updated, QtCore.pyqtBoundSignal)
@@ -361,5 +361,5 @@
 
         # Test presence of comboboxes in last column
-        for row in xrange(self.widget._poly_model.rowCount()):
+        for row in range(self.widget._poly_model.rowCount()):
             func_index = self.widget._poly_model.index(row, 6)
             self.assertTrue(isinstance(self.widget.lstPoly.indexWidget(func_index), QtGui.QComboBox))
@@ -509,5 +509,5 @@
 
         # Test rows
-        for row in xrange(self.widget._magnet_model.rowCount()):
+        for row in range(self.widget._magnet_model.rowCount()):
             func_index = self.widget._magnet_model.index(row, 0)
             self.assertIn(':', self.widget._magnet_model.item(row, 0).text())
@@ -889,5 +889,5 @@
 
         # check that range of variation for this parameter has NOT been changed
-        print self.widget.kernel_module.details[name_modified_param]
+        print(self.widget.kernel_module.details[name_modified_param])
         self.assertNotIn(new_value, self.widget.kernel_module.details[name_modified_param] )
 
