# HG changeset patch # User Alain Mazy # Date 1776171815 -7200 # Node ID 03968d801f3f65e93f1f570a1715baf4978525e3 # Parent 33e17e3581e3a1e06f570d6671ed1b580e49618f fix find_label for MySQL diff -r 33e17e3581e3 -r 03968d801f3f Tests/Tests.py --- a/Tests/Tests.py Tue Apr 14 13:45:12 2026 +0200 +++ b/Tests/Tests.py Tue Apr 14 15:03:35 2026 +0200 @@ -10437,7 +10437,9 @@ # The instance has label "a" self.assertEqual(1, len(Execute([], 'All'))) self.assertEqual(1, len(Execute([], 'Any'))) - if IsOrthancVersionAbove(_REMOTE, 1, 12, 11): # From 1.12.11, 'None' with an empty labels list means "list all resources without any labels" + # From 1.12.11, 'None' with an empty labels list means "list all resources without any labels" + # But this is currently only implemented in SQLite and PostgreSQL + if IsOrthancVersionAbove(_REMOTE, 1, 12, 11) and not HasMySQLIndexPlugin(_REMOTE) and not HasODBCIndexPlugin(_REMOTE): self.assertEqual(0, len(Execute([], 'None'))) else: self.assertEqual(1, len(Execute([], 'None'))) diff -r 33e17e3581e3 -r 03968d801f3f Tests/Toolbox.py --- a/Tests/Toolbox.py Tue Apr 14 13:45:12 2026 +0200 +++ b/Tests/Toolbox.py Tue Apr 14 15:03:35 2026 +0200 @@ -484,6 +484,13 @@ plugins = DoGet(orthanc, '/plugins') return ('postgresql-index' in plugins) +def HasMySQLIndexPlugin(orthanc): + plugins = DoGet(orthanc, '/plugins') + return ('mysql-index' in plugins) + +def HasODBCIndexPlugin(orthanc): + plugins = DoGet(orthanc, '/plugins') + return ('odbc-index' in plugins) def _GetMaxImageDifference(im1, im2): h = ImageChops.difference(im1, im2).histogram()