77import copy
88import random
99import string
10+ from datetime import date
1011
1112from one .api import ONE
1213from neuropixel import trace_header
@@ -322,7 +323,8 @@ def _02_manual_resolution_latest(self):
322323 alignment_stored = '2020-09-28T15:57:25_mayo' ,
323324 alignment_count = 3 ,
324325 trajectory_created = False ,
325- alignment_qc = 0.604081 )
326+ alignment_qc = 0.604081 ,
327+ alignment_date = date .today ().isoformat ())
326328
327329 def _03_manual_resolution_not_latest (self ):
328330 align_qc = AlignmentQC (self .probe_id , one = one , brain_atlas = brain_atlas , channels = False )
@@ -338,7 +340,8 @@ def _03_manual_resolution_not_latest(self):
338340 alignment_stored = '2020-09-28T10:03:06_alejandro' ,
339341 alignment_count = 3 ,
340342 trajectory_created = True ,
341- alignment_qc = 0.604081 )
343+ alignment_qc = 0.604081 ,
344+ alignment_date = date .today ().isoformat ())
342345
343346 @classmethod
344347 def tearDownClass (cls ) -> None :
@@ -347,7 +350,7 @@ def tearDownClass(cls) -> None:
347350
348351
349352def _verify (tc , alignment_resolved = None , alignment_count = None ,
350- alignment_stored = None , trajectory_created = False , alignment_qc = None ):
353+ alignment_stored = None , trajectory_created = False , alignment_qc = None , alignment_date = None ):
351354 """
352355 For a given test case with a `probe_id` attribute, check that Alyx returns insertion records
353356 that match the provided parameters.
@@ -382,6 +385,8 @@ def _verify(tc, alignment_resolved=None, alignment_count=None,
382385 f'&probe_id={ tc .probe_id } '
383386 '&provenance=Ephys aligned histology track' , clobber = True )
384387 tc .assertNotEqual (tc .prev_traj_id == traj [0 ]['id' ], trajectory_created )
388+ if alignment_date :
389+ tc .assertEqual (insertion ['json' ]['extended_qc' ]['alignment_resolved_date' ], alignment_date )
385390
386391
387392class TestUploadToFlatIron (unittest .TestCase ):
0 commit comments