SEBA-497 delayering, Makefile, and tox for fabric-crossconnect-synchronizer
Change-Id: Ibcf8fd06b9ad94d3f198887c18be7adfa4d5a954
diff --git a/xos/synchronizer/models/test_models.py b/xos/synchronizer/models/test_models.py
index 47b1bb2..25f83ed 100755
--- a/xos/synchronizer/models/test_models.py
+++ b/xos/synchronizer/models/test_models.py
@@ -13,20 +13,25 @@
# limitations under the License.
import unittest
-import os, sys
+import os
+import sys
from mock import patch, Mock, MagicMock
-test_path=os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
+test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
# mocking XOS exception, as they're based in Django
+
+
class Exceptions:
XOSValidationError = Exception
XOSProgrammingError = Exception
XOSPermissionDenied = Exception
+
class XOS:
exceptions = Exceptions
+
class TestFabricCrossconnectModels(unittest.TestCase):
def setUp(self):
@@ -40,7 +45,6 @@
self.models_decl.BNGPortMapping_decl.objects = Mock()
self.models_decl.BNGPortMapping_decl.objects.filter.return_value = []
-
modules = {
'xos': MagicMock(),
'xos.exceptions': self.xos.exceptions,
@@ -115,5 +119,6 @@
self.assertEqual(e.exception.message, 'Malformed range 123,')
+
if __name__ == '__main__':
unittest.main()