Mercurial > hg > orthanc-tests
changeset 907:d379e803c138
fix MySQL label tests for mainline
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Wed, 15 Apr 2026 08:57:39 +0200 |
| parents | 47895e9cff74 |
| children | 1c0345bc3721 |
| files | Tests/Tests.py |
| diffstat | 1 files changed, 18 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/Tests/Tests.py Wed Apr 15 08:34:39 2026 +0200 +++ b/Tests/Tests.py Wed Apr 15 08:57:39 2026 +0200 @@ -10438,11 +10438,12 @@ self.assertEqual(1, len(Execute([], 'All'))) self.assertEqual(1, len(Execute([], 'Any'))) # 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 (and in the mainline MySQL) - if IsOrthancVersionAbove(_REMOTE, 1, 12, 11) and (not HasMySQLIndexPlugin(_REMOTE) or IsPluginVersionAtLeast(_REMOTE, 'orthanc-mysql', 6, 0, 0)) and not HasODBCIndexPlugin(_REMOTE): - self.assertEqual(0, len(Execute([], 'None'))) - else: - self.assertEqual(1, len(Execute([], 'None'))) + # But this is currently only implemented in SQLite and PostgreSQL + if not HasMySQLIndexPlugin(_REMOTE) and not HasODBCIndexPlugin(_REMOTE): + if IsOrthancVersionAbove(_REMOTE, 1, 12, 11): + self.assertEqual(0, len(Execute([], 'None'))) + else: + self.assertEqual(1, len(Execute([], 'None'))) self.assertEqual(1, len(Execute([ 'a' ], 'All'))) self.assertEqual(1, len(Execute([ 'a' ], 'Any'))) self.assertEqual(0, len(Execute([ 'a' ], 'None'))) @@ -10499,11 +10500,12 @@ self.assertEqual(1, len(Execute([], 'All'))) self.assertEqual(1, len(Execute([], 'Any'))) # 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 (and in the mainline MySQL) - if IsOrthancVersionAbove(_REMOTE, 1, 12, 11) and (not HasMySQLIndexPlugin(_REMOTE) or IsPluginVersionAtLeast(_REMOTE, 'orthanc-mysql', 6, 0, 0)) and not HasODBCIndexPlugin(_REMOTE): - self.assertEqual(0, len(Execute([], 'None'))) - else: - self.assertEqual(1, len(Execute([], 'None'))) + # But this is currently only implemented in SQLite and PostgreSQL + if not HasMySQLIndexPlugin(_REMOTE) and not HasODBCIndexPlugin(_REMOTE): + if IsOrthancVersionAbove(_REMOTE, 1, 12, 11): + self.assertEqual(0, len(Execute([], 'None'))) + else: + self.assertEqual(1, len(Execute([], 'None'))) self.assertEqual(1, len(Execute([ 'a' ], 'All'))) self.assertEqual(1, len(Execute([ 'a' ], 'Any'))) self.assertEqual(0, len(Execute([ 'a' ], 'None'))) @@ -10525,11 +10527,12 @@ self.assertEqual(1, len(Execute([], 'All'))) self.assertEqual(1, len(Execute([], 'Any'))) # 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 (and in the mainline MySQL) - if IsOrthancVersionAbove(_REMOTE, 1, 12, 11) and (not HasMySQLIndexPlugin(_REMOTE) or IsPluginVersionAtLeast(_REMOTE, 'orthanc-mysql', 6, 0, 0)) and not HasODBCIndexPlugin(_REMOTE): - self.assertEqual(0, len(Execute([], 'None'))) - else: - self.assertEqual(1, len(Execute([], 'None'))) + # But this is currently only implemented in SQLite and PostgreSQL + if not HasMySQLIndexPlugin(_REMOTE) and not HasODBCIndexPlugin(_REMOTE): + if IsOrthancVersionAbove(_REMOTE, 1, 12, 11): + self.assertEqual(0, len(Execute([], 'None'))) + else: + self.assertEqual(1, len(Execute([], 'None'))) self.assertEqual(0, len(Execute([ 'a' ], 'All'))) self.assertEqual(0, len(Execute([ 'a' ], 'Any'))) self.assertEqual(1, len(Execute([ 'a' ], 'None')))
