Commit 235165fb authored by David Trudgian's avatar David Trudgian
Browse files

Fix ImageException test

parent e8f940b6
......@@ -6,7 +6,7 @@ import time
import pytest
import requests
from clair_singularity.image import image_to_tgz, check_image, http_server
from clair_singularity.image import image_to_tgz, check_image, http_server, ImageException
from clair_singularity.util import sha256, err_and_exit, wait_net_service
......@@ -25,10 +25,9 @@ def test_check_image(testimage):
# Valid image return True
assert check_image(testimage)
# Sys exit for invalid image
with pytest.raises(SystemExit) as pytest_wrapped_e:
with pytest.raises(ImageException) as pytest_wrapped_e:
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 66
assert pytest_wrapped_e.type == ImageException
def test_image_to_tgz(testimage):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment