Commit 0a989851 authored by Luc Yriarte's avatar Luc Yriarte
Browse files

Use proper pytest exception check

parent a960bafd
Pipeline #48660 failed with stages
in 22 minutes and 12 seconds
......@@ -11,6 +11,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.
import pytest
from app.bulk_persistence import BulkId
import uuid
......@@ -31,9 +32,5 @@ def test_decode_urn_with_prefix():
assert prefix == 'myprefix'
def test_decode_urn_none():
uuid = None
try:
with pytest.raises(ValueError):
uuid, prefix = BulkId.bulk_urn_decode(None)
except ValueError:
pass
assert uuid is None
\ No newline at end of file
Supports Markdown
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