diff PerfsDb/Tests/FindStudy.py @ 156:f1a75985caa8

first Db test framework - work in progress
author am@osimis.io
date Thu, 16 Aug 2018 17:13:32 +0200
parents
children 1ff0d830bb87
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PerfsDb/Tests/FindStudy.py	Thu Aug 16 17:13:32 2018 +0200
@@ -0,0 +1,51 @@
+from Test import Test
+
+class TestFindStudyByStudyDescription1Result(Test):
+
+    def __init__(self, name:str = "FindStudyByStudyDescription1Result"):
+        super().__init__(name)
+
+    def test(self):
+        self._orthanc.studies.query(
+            query = {"StudyDescription": "99999-99999"}
+        )
+
+class TestFindStudyByStudyDescription0Results(Test):
+
+    def __init__(self, name:str = "FindStudyByStudyDescription0Results"):
+        super().__init__(name)
+
+    def test(self):
+        self._orthanc.studies.query(
+            query = {"StudyDescription": "X"}
+        )
+
+class TestFindStudyByPatientId1Result(Test):
+
+    def __init__(self, name:str = "FindStudyByPatientId1Result"):
+        super().__init__(name)
+
+    def test(self):
+        self._orthanc.studies.query(
+            query = {"PatientID": "99999"}
+        )
+
+class TestFindStudyByPatientId0Results(Test):
+
+    def __init__(self, name:str = "FindStudyByPatientId0Results"):
+        super().__init__(name)
+
+    def test(self):
+        self._orthanc.studies.query(
+            query = {"PatientID": "X"}
+        )        
+
+class TestFindStudyByPatientId5Results(Test):
+
+    def __init__(self, name:str = "FindStudyByPatientId5Results"):
+        super().__init__(name)
+
+    def test(self):
+        self._orthanc.studies.query(
+            query = {"PatientID": "99998"}
+        )        
\ No newline at end of file