Mercurial > hg > orthanc-tests
diff Tests/Tests.py @ 177:ef6b791c6d62 Orthanc-1.4.2
fix version checks
author | am@osimis.io |
---|---|
date | Thu, 20 Sep 2018 12:38:37 +0200 |
parents | 48cc188ffb09 |
children | 8a2dd77d4035 |
line wrap: on
line diff
--- a/Tests/Tests.py Thu Sep 20 12:35:32 2018 +0200 +++ b/Tests/Tests.py Thu Sep 20 12:38:37 2018 +0200 @@ -146,14 +146,20 @@ def test_system(self): + self.assertTrue('Version' in DoGet(_REMOTE, '/system')) + self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalDiskSize']) + self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalUncompressedSize']) + + systemInfo = DoGet(_REMOTE, '/system') + if systemInfo["Version"] == "mainline": + print "Skipping version checks since you're currently in mainline" + return + self.assertTrue(IsOrthancVersionAbove(_LOCAL, 0, 8, 6)) self.assertFalse(IsOrthancVersionAbove(_LOCAL, 0, 8, 7)) self.assertTrue(IsOrthancVersionAbove(_LOCAL, 0, 7, 6)) self.assertFalse(IsOrthancVersionAbove(_LOCAL, 0, 9, 6)) self.assertFalse(IsOrthancVersionAbove(_LOCAL, 1, 8, 6)) - self.assertTrue('Version' in DoGet(_REMOTE, '/system')) - self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalDiskSize']) - self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalUncompressedSize']) def test_upload(self): self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalDiskSize'])