def test_create_next_stage_file(storepath, sample_with_stages): stage = sample_with_stages['stages'][0] ssf1 = models.SampleStageFile('source-file', stage) fn1 = os.path.join(storepath, ssf1.relative_target_path) touch(fn1) ssf2 = models.SampleStageFile('source-file', stage) assert '/'.join([ 'project-PqrX9', 'sample-OQn6Q', 'stage-Drn1Q.method-XZOQ0', 'source-file-00001' ]) == ssf2.relative_target_path
def test_create_stage_file_for_second_stage(storepath, sample_with_stages): stage = sample_with_stages['stages'][1] ssf = models.SampleStageFile('source-file', stage) assert '/'.join([ 'project-PqrX9', 'sample-OQn6Q', 'stage-bQ8bm.method-XZOQ0', 'source-file-00000' ]) == ssf.relative_target_path