Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
antgonza committed Feb 22, 2019
1 parent eb172a1 commit 64f27d5
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions qiita_pet/handlers/api_proxy/tests/test_studies.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,15 @@ def test_study_files_get_req_multiple(self):
'shared@foo.bar', 1, pt.id, 'per_sample_FASTQ')
exp = {'status': 'success', 'num_prefixes': 2, 'artifacts': [],
'remaining': ['uploaded_file.txt'], 'message': '',
'file_types': [('raw_forward_seqs', True,
['test_2.R1.fastq.gz', 'test_1.R1.fastq.gz']),
('raw_reverse_seqs', False,
['test_2.R2.fastq.gz', 'test_1.R2.fastq.gz'])]}
'file_types': [
('raw_forward_seqs', True, sorted(
['test_2.R1.fastq.gz', 'test_1.R1.fastq.gz'])),
('raw_reverse_seqs', False, sorted(
['test_2.R2.fastq.gz', 'test_1.R2.fastq.gz']))]}
# making sure they are always in the same order
oft = obs['file_types']
obs['file_types'][0] = (oft[0][0], oft[0][1], sorted(oft[0][2]))
obs['file_types'][1] = (oft[1][0], oft[1][1], sorted(oft[1][2]))
self.assertEqual(obs, exp)

# let's an extra file that matches
Expand Down Expand Up @@ -398,11 +403,15 @@ def test_study_files_get_req_multiple(self):
'artifacts': [(1, 'Identification of the Microbiomes for '
'Cannabis Soils (1) - Raw data 1 (1)')],
'file_types': [
('raw_barcodes', True,
['test_2.R1.fastq.gz', 'test_1.R1.fastq.gz']),
('raw_forward_seqs', True,
['test_2.R2.fastq.gz', 'test_1.R2.fastq.gz']),
('raw_barcodes', True, sorted(
['test_2.R1.fastq.gz', 'test_1.R1.fastq.gz'])),
('raw_forward_seqs', True, sorted(
['test_2.R2.fastq.gz', 'test_1.R2.fastq.gz'])),
('raw_reverse_seqs', False, ['test_1.R3.fastq.gz'])]}
# making sure they are always in the same order
oft = obs['file_types']
obs['file_types'][0] = (oft[0][0], oft[0][1], sorted(oft[0][2]))
obs['file_types'][1] = (oft[1][0], oft[1][1], sorted(oft[1][2]))
self.assertEqual(obs, exp)

PREP.delete(pt.id)
Expand Down

0 comments on commit 64f27d5

Please sign in to comment.