Commit 34583855 authored by Mark Hymers's avatar Mark Hymers

Fix acceptance of STRUCTURAL scans

Signed-off-by: Mark Hymers's avatarMark Hymers <mark.hymers@ynic.york.ac.uk>
parent a23550d8
Pipeline #1425 passed with stage
in 9 minutes and 28 seconds
......@@ -96,6 +96,10 @@ class RawAndAnonDestination(Destination):
self.regex_study.search(studydesc):
return True
if self.regex_patient.search(patientid) and \
studydesc in self.anon_extra_studies:
return True
return False
def get_raw_directory(self, patientid, studydesc):
......
......@@ -69,6 +69,7 @@ class TestRawAndAnonDestination:
assert(dest.for_us('R1234', 'P1008:Test_series') is True)
assert(dest.for_us('R1234', 'P1008a') is True)
assert(dest.for_us('R1234', 'P1008a:Test_series') is True)
assert(dest.for_us('R1234', 'STRUCTURAL') is True)
assert(dest.for_us('E1234', 'TEST') is False)
assert(dest.for_us('E1234', 'C1008') is True)
assert(dest.for_us('E1234', 'C1008a') is True)
......@@ -76,6 +77,7 @@ class TestRawAndAnonDestination:
assert(dest.for_us('E1234', 'P1008') is True)
assert(dest.for_us('E1234', 'P1008a') is True)
assert(dest.for_us('E1234', 'P1008a:Test_series') is True)
assert(dest.for_us('E1234', 'STRUCTURAL') is True)
assert(dest.for_us('NOPE', 'TEST') is False)
assert(dest.for_us('NOPE', 'C1008') is False)
assert(dest.for_us('NOPE', 'C1008:Test_series') is False)
......@@ -84,6 +86,7 @@ class TestRawAndAnonDestination:
assert(dest.for_us('NOPE', 'P1008') is False)
assert(dest.for_us('NOPE', 'P1008a') is False)
assert(dest.for_us('NOPE', 'P1008a:Test_series') is False)
assert(dest.for_us('NOPE', 'STRUCTURAL') is False)
def test_get_raw_directory(self, tmpdir):
from yias.destinations import RawAndAnonDestination
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment