annotate PerfsDb/Tests/FindStudy.py @ 403:e08e15befa0c

test sync POST to /archive
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Jun 2021 17:42:20 +0200
parents 1ff0d830bb87
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
156
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
1 from Test import Test
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
2
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
3 class TestFindStudyByStudyDescription1Result(Test):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
4
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
5 def __init__(self, name:str = "FindStudyByStudyDescription1Result"):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
6 super().__init__(name)
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
7
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
8 def test(self):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
9 self._orthanc.studies.query(
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
10 query = {"StudyDescription": "99999-99999"}
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
11 )
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
12
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
13 class TestFindStudyByStudyDescription0Results(Test):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
14
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
15 def __init__(self, name:str = "FindStudyByStudyDescription0Results"):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
16 super().__init__(name)
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
17
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
18 def test(self):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
19 self._orthanc.studies.query(
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
20 query = {"StudyDescription": "X"}
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
21 )
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
22
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
23 class TestFindStudyByPatientId1Result(Test):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
24
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
25 def __init__(self, name:str = "FindStudyByPatientId1Result"):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
26 super().__init__(name)
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
27
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
28 def test(self):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
29 self._orthanc.studies.query(
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
30 query = {"PatientID": "99999"}
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
31 )
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
32
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
33 class TestFindStudyByPatientId0Results(Test):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
34
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
35 def __init__(self, name:str = "FindStudyByPatientId0Results"):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
36 super().__init__(name)
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
37
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
38 def test(self):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
39 self._orthanc.studies.query(
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
40 query = {"PatientID": "X"}
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
41 )
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
42
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
43 class TestFindStudyByPatientId5Results(Test):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
44
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
45 def __init__(self, name:str = "FindStudyByPatientId5Results"):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
46 super().__init__(name)
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
47
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
48 def test(self):
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
49 self._orthanc.studies.query(
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
50 query = {"PatientID": "99998"}
165
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
51 )
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
52
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
53 class TestFindStudyByPatientId100Results(Test):
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
54
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
55 def __init__(self, name:str = "FindStudyByPatientId100Results"):
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
56 super().__init__(name)
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
57
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
58 def test(self):
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
59 self._orthanc.studies.query(
1ff0d830bb87 find 100 results
am@osimis.io
parents: 156
diff changeset
60 query = {"PatientID": "99997"}
156
f1a75985caa8 first Db test framework - work in progress
am@osimis.io
parents:
diff changeset
61 )