From d263ba73cef0ee69f08b4266b768baad4bdcec35 Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 19 Apr 2023 15:30:42 +0200 Subject: [PATCH] Fix CI: Test for Exception rather than None --- src/test/python/release_mixin/test_infrastructure.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/python/release_mixin/test_infrastructure.py b/src/test/python/release_mixin/test_infrastructure.py index fefe233..da427b3 100644 --- a/src/test/python/release_mixin/test_infrastructure.py +++ b/src/test/python/release_mixin/test_infrastructure.py @@ -79,5 +79,8 @@ def test_release_type_repository_env(): assert release_type == None sut = ReleaseTypeRepository.from_environment(MockEnvironmentApi({'REL_TYPE': 'Not the right variable'})) - release_type = sut.get_release_type() - assert release_type == None \ No newline at end of file + try: + release_type = sut.get_release_type() + except: + assert release_type == None + \ No newline at end of file