Mercurial > hg > orthanc-tests
comparison PerfsDb/Tests/UploadFile.py @ 158:df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
author | am@osimis.io |
---|---|
date | Fri, 17 Aug 2018 11:58:26 +0200 |
parents | f1a75985caa8 |
children | 27b3b0df5f90 |
comparison
equal
deleted
inserted
replaced
157:ac14100ffbd7 | 158:df1f9946571c |
---|---|
6 super().__init__(name) | 6 super().__init__(name) |
7 self._instanceId = None | 7 self._instanceId = None |
8 self._filePath = filePath | 8 self._filePath = filePath |
9 self._dicomFileContent = None | 9 self._dicomFileContent = None |
10 | 10 |
11 def prepare(self): | 11 def beforeAll(self): |
12 # get the instance Id and dicom file content | 12 # get the instance Id and dicom file content |
13 if self._instanceId is None: | 13 if self._instanceId is None: |
14 self._instanceId = self._orthanc.uploadDicomFile(self._filePath) | 14 self._instanceId = self._orthanc.uploadDicomFile(self._filePath) |
15 self._dicomFileContent = self._orthanc.instances.getDicom(self._instanceId) | 15 self._dicomFileContent = self._orthanc.instances.getDicom(self._instanceId) |
16 | 16 |
17 def beforeEach(self): | |
17 # make sure the file is not in Orthanc before the upload | 18 # make sure the file is not in Orthanc before the upload |
18 self._orthanc.instances.delete(self._instanceId) | 19 self._orthanc.instances.delete(self._instanceId) |
19 | 20 |
20 def test(self): | 21 def test(self): |
21 self._orthanc.uploadDicom(self._dicomFileContent) | 22 self._orthanc.uploadDicom(self._dicomFileContent) |