Skip to content

Commit

Permalink
Merge pull request #1465 from psavery/simplify-401-error-check
Browse files Browse the repository at this point in the history
Simplify check for 401 error message in test
  • Loading branch information
manthey authored Feb 13, 2024
2 parents 7690b7a + f01bb58 commit 2d41f5d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/test_source_dicomweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def testTilesFromDICOMweb():
token = os.getenv('DICOMWEB_TEST_TOKEN')
if token:
# First, verify that we receive an authorization error without the token
match_message = '401 Client Error: Unauthorized for url'
with pytest.raises(TileSourceError, match=match_message):
with pytest.raises(TileSourceError, match='401'):
large_image_source_dicom.open(dicomweb_file)

# Create a session, add the token, and try again
Expand Down

0 comments on commit 2d41f5d

Please sign in to comment.