diff options
author | Steven Pisarski <s.pisarski@cablelabs.com> | 2017-07-24 15:03:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-07-24 15:03:23 +0000 |
commit | 8e9920d2e8bd4a3d404b4589312cdc9510708a37 (patch) | |
tree | a7a0e941124255e904e34751e698b4515c95d4d0 /snaps/openstack/tests/create_image_tests.py | |
parent | c1b8dbb0a4c9a7baa4f370955dc6c6f00bbb67a9 (diff) | |
parent | 663cc3617e45f6967db4af2c0a4a27e9256923f1 (diff) |
Merge "Refactor glance_utils.py v1 image creation."
Diffstat (limited to 'snaps/openstack/tests/create_image_tests.py')
-rw-r--r-- | snaps/openstack/tests/create_image_tests.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/snaps/openstack/tests/create_image_tests.py b/snaps/openstack/tests/create_image_tests.py index d538fef..6c9b175 100644 --- a/snaps/openstack/tests/create_image_tests.py +++ b/snaps/openstack/tests/create_image_tests.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from glanceclient.exc import HTTPBadRequest try: from urllib.request import URLError @@ -514,8 +515,14 @@ class CreateImageNegativeTests(OSIntegrationTestCase): img_format=os_image_settings.format, url="http://foo.bar")) - with self.assertRaises(URLError): + try: self.image_creator.create() + except HTTPBadRequest: + pass + except URLError: + pass + except Exception as e: + self.fail('Invalid Exception ' + str(e)) def test_bad_image_file(self): """ |