summaryrefslogtreecommitdiffstats
path: root/test/test_api_validation.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_api_validation.py')
-rw-r--r--test/test_api_validation.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/test_api_validation.py b/test/test_api_validation.py
index 389ff62..73d03cd 100644
--- a/test/test_api_validation.py
+++ b/test/test_api_validation.py
@@ -18,9 +18,10 @@
import json
import unittest
-from osdf.models.api.placementRequest import PlacementAPI
-from osdf.models.api.placementResponse import PlacementResponse
-from schematics.exceptions import ModelValidationError
+from schematics.exceptions import DataError
+
+from apps.placement.models.api.placementRequest import PlacementAPI
+from apps.placement.models.api.placementResponse import PlacementResponse
class TestReqValidation(unittest.TestCase):
@@ -37,7 +38,7 @@ class TestReqValidation(unittest.TestCase):
def test_req_failure(self):
req_json = {}
- self.assertRaises(ModelValidationError, lambda: PlacementAPI(req_json).validate())
+ self.assertRaises(DataError, lambda: PlacementAPI(req_json).validate())
class TestResponseValidation(unittest.TestCase):
@@ -54,7 +55,7 @@ class TestResponseValidation(unittest.TestCase):
def test_invalid_response(self):
resp_json = {}
- self.assertRaises(ModelValidationError, lambda: PlacementResponse(resp_json).validate())
+ self.assertRaises(DataError, lambda: PlacementResponse(resp_json).validate())
if __name__ == "__main__":