diff options
author | vrvarma <vv8305@att.com> | 2019-12-13 10:24:55 -0500 |
---|---|---|
committer | vrvarma <vv8305@att.com> | 2019-12-13 10:29:45 -0500 |
commit | 430153e1a9489a86cf0ff7942eceb0bf5f1c170c (patch) | |
tree | b22090b80d11761a24d9cbeaa6348704cce2de83 /test/test_api_validation.py | |
parent | 34ba229b31758c38a299a163de0007848b5921be (diff) |
osdf rearchitecture into apps and libs
Change-Id: I2db2f8e252bd5e60807b2ffabf5a5b193a789f7a
Signed-off-by: vrvarma <vv8305@att.com>
Issue-ID: OPTFRA-637
Diffstat (limited to 'test/test_api_validation.py')
-rw-r--r-- | test/test_api_validation.py | 11 |
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__": |