コード例 #1
0
 def test_prep_template_filepaths_get_req_no_access(self):
     obs = prep_template_filepaths_get_req(1, '*****@*****.**')
     exp = {
         'status': 'error',
         'message': 'User does not have access to study'
     }
     self.assertEqual(obs, exp)
コード例 #2
0
 def test_prep_template_filepaths_get_req(self):
     obs = prep_template_filepaths_get_req(1, '*****@*****.**')
     exp = {
         'status':
         'success',
         'message':
         '',
         'filepaths': [(21,
                        join(
                            get_mountpoint('templates')[0][1],
                            '1_prep_1_qiime_19700101-000000.txt')),
                       (20,
                        join(
                            get_mountpoint('templates')[0][1],
                            '1_prep_1_19700101-000000.txt')),
                       (19,
                        join(
                            get_mountpoint('templates')[0][1],
                            '1_prep_1_qiime_19700101-000000.txt')),
                       (18,
                        join(
                            get_mountpoint('templates')[0][1],
                            '1_prep_1_19700101-000000.txt'))]
     }
     self.assertEqual(obs, exp)
コード例 #3
0
 def test_prep_template_filepaths_get_req(self):
     obs = prep_template_filepaths_get_req(1, '*****@*****.**')
     # have to check each key individually as the filepaths will change
     self.assertEqual(obs['status'], 'success')
     self.assertEqual(obs['message'], '')
     # [0] the fp_id is the first element, that should change
     fp_ids = [fp[0] for fp in obs['filepaths']]
     self.assertItemsEqual(fp_ids, [18, 19, 20, 21, 23, 24])
コード例 #4
0
 def test_prep_template_filepaths_get_req(self):
     obs = prep_template_filepaths_get_req(1, '*****@*****.**')
     # have to check each key individually as the filepaths will change
     self.assertEqual(obs['status'], 'success')
     self.assertEqual(obs['message'], '')
     # [0] the fp_id is the first element, that should change
     fp_ids = [fp[0] for fp in obs['filepaths']]
     self.assertItemsEqual(fp_ids, [18, 19, 20, 21, 23, 24])
コード例 #5
0
ファイル: test_prep_template.py プロジェクト: yimsea/qiita
 def test_prep_template_filepaths_get_req(self):
     obs = prep_template_filepaths_get_req(1, '*****@*****.**')
     exp = {'status': 'success',
            'message': '',
            'filepaths': [
                (19, join(get_mountpoint('templates')[0][1],
                          '1_prep_1_qiime_19700101-000000.txt')),
                (18, join(get_mountpoint('templates')[0][1],
                          '1_prep_1_19700101-000000.txt'))]}
     self.assertEqual(obs, exp)
コード例 #6
0
ファイル: test_prep_template.py プロジェクト: yimsea/qiita
 def test_prep_template_filepaths_get_req_no_access(self):
     obs = prep_template_filepaths_get_req(1, '*****@*****.**')
     exp = {'status': 'error',
            'message': 'User does not have access to study'}
     self.assertEqual(obs, exp)