Пример #1
0
    def test_prep_template_ajax_get_req(self):
        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        exp = {'status': 'success',
               'message': '',
               'name': "Prep information 1",
               'files': ["uploaded_file.txt"],
               'download_prep': 18,
               'download_qiime': 19,
               'num_samples': 27,
               'num_columns': 22,
               'investigation_type': 'Metagenomics',
               'ontology': {
                   'ENA': ['Cancer Genomics', 'Epigenetics',
                           'Exome Sequencing', 'Forensic or Paleo-genomics',
                           'Gene Regulation Study', 'Metagenomics',
                           'Pooled Clone Sequencing', 'Population Genomics',
                           'RNASeq', 'Resequencing', 'Synthetic Genomics',
                           'Transcriptome Analysis', 'Whole Genome Sequencing',
                           'Other'],
                   'User': []},
               'artifact_attached': True,
               'study_id': 1,
               'editable': True,
               'data_type': '18S',
               'alert_type': '',
               'alert_message': ''}
        self.assertEqual(obs, exp)

        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        self.assertEqual(obs, exp)

        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        exp['editable'] = False
        self.assertEqual(obs, exp)
Пример #2
0
    def test_prep_template_ajax_get_req(self):
        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        exp = {'status': 'success',
               'message': '',
               'name': "Prep information 1",
               'files': ["uploaded_file.txt"],
               'download_prep': 20,
               'download_qiime': 21,
               'num_samples': 27,
               'num_columns': 22,
               'investigation_type': 'Metagenomics',
               'ontology': {
                   'ENA': ['Cancer Genomics', 'Epigenetics',
                           'Exome Sequencing', 'Forensic or Paleo-genomics',
                           'Gene Regulation Study', 'Metagenomics',
                           'Pooled Clone Sequencing', 'Population Genomics',
                           'RNASeq', 'Resequencing', 'Synthetic Genomics',
                           'Transcriptome Analysis', 'Whole Genome Sequencing',
                           'Other'],
                   'User': []},
               'artifact_attached': True,
               'study_id': 1,
               'editable': True,
               'data_type': '18S',
               'alert_type': '',
               'is_submitted_to_ebi': True,
               'alert_message': ''}
        self.assertEqual(obs, exp)

        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        self.assertEqual(obs, exp)

        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        exp['editable'] = False
        self.assertEqual(obs, exp)
Пример #3
0
    def test_prep_template_ajax_get_req(self):
        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        exp = {'status': 'success',
               'message': '',
               'name': "Prep information 1",
               'files': ["uploaded_file.txt"],
               'download_prep_id': 24,
               'download_qiime_id': 25,
               'other_filepaths': ['1_prep_1_19700101-000000.txt',
                                   '1_prep_1_19700101-000000.txt'],
               'num_samples': 27,
               'num_columns': 22,
               'investigation_type': 'Metagenomics',
               'ontology': {
                   'ENA': ['Cancer Genomics', 'Epigenetics',
                           'Exome Sequencing', 'Forensic or Paleo-genomics',
                           'Gene Regulation Study', 'Metagenomics',
                           'Pooled Clone Sequencing', 'Population Genomics',
                           'RNASeq', 'Resequencing', 'Synthetic Genomics',
                           'Transcriptome Analysis', 'Whole Genome Sequencing',
                           'Other'],
                   'User': []},
               'artifact_attached': True,
               'study_id': 1,
               'editable': True,
               'data_type': '18S',
               'alert_type': '',
               'is_submitted_to_ebi': True,
               'prep_restrictions': '',
               'samples': ['1.SKB1.640202', '1.SKB2.640194', '1.SKB3.640195',
                           '1.SKB4.640189', '1.SKB5.640181', '1.SKB6.640176',
                           '1.SKB7.640196', '1.SKB8.640193', '1.SKB9.640200',
                           '1.SKD1.640179', '1.SKD2.640178', '1.SKD3.640198',
                           '1.SKD4.640185', '1.SKD5.640186', '1.SKD6.640190',
                           '1.SKD7.640191', '1.SKD8.640184', '1.SKD9.640182',
                           '1.SKM1.640183', '1.SKM2.640199', '1.SKM3.640197',
                           '1.SKM4.640180', '1.SKM5.640177', '1.SKM6.640187',
                           '1.SKM7.640188', '1.SKM8.640201', '1.SKM9.640192'],
               'alert_message': ''}
        self.assertDictEqual(obs, exp)

        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        self.assertEqual(obs, exp)

        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        exp['editable'] = False
        self.assertEqual(obs, exp)
Пример #4
0
    def test_prep_template_ajax_get_req(self):
        obs = prep_template_ajax_get_req('*****@*****.**', 1)

        exp = {
            'status':
            'success',
            'message':
            '',
            'name':
            "Prep information 1",
            'files': ["uploaded_file.txt"],
            'download_prep_id':
            24,
            'other_filepaths': [
                '1_prep_1_qiime_19700101-000000.txt',
                '1_prep_1_19700101-000000.txt',
                '1_prep_1_qiime_19700101-000000.txt',
                '1_prep_1_19700101-000000.txt'
            ],
            'num_samples':
            27,
            'num_columns':
            22,
            'investigation_type':
            'Metagenomics',
            'ontology': {
                'ENA': [
                    'Cancer Genomics', 'Epigenetics', 'Exome Sequencing',
                    'Forensic or Paleo-genomics', 'Gene Regulation Study',
                    'Metagenomics', 'Pooled Clone Sequencing',
                    'Population Genomics', 'RNASeq', 'Resequencing',
                    'Synthetic Genomics', 'Transcriptome Analysis',
                    'Whole Genome Sequencing', 'Other'
                ],
                'User': []
            },
            'artifact_attached':
            True,
            'study_id':
            1,
            'editable':
            True,
            'data_type':
            '18S',
            'alert_type':
            '',
            'is_submitted_to_ebi':
            True,
            'prep_restrictions':
            '',
            'samples': [
                '1.SKB1.640202', '1.SKB2.640194', '1.SKB3.640195',
                '1.SKB4.640189', '1.SKB5.640181', '1.SKB6.640176',
                '1.SKB7.640196', '1.SKB8.640193', '1.SKB9.640200',
                '1.SKD1.640179', '1.SKD2.640178', '1.SKD3.640198',
                '1.SKD4.640185', '1.SKD5.640186', '1.SKD6.640190',
                '1.SKD7.640191', '1.SKD8.640184', '1.SKD9.640182',
                '1.SKM1.640183', '1.SKM2.640199', '1.SKM3.640197',
                '1.SKM4.640180', '1.SKM5.640177', '1.SKM6.640187',
                '1.SKM7.640188', '1.SKM8.640201', '1.SKM9.640192'
            ],
            'deprecated':
            False,
            'alert_message':
            ''
        }

        self.assertDictEqual(obs, exp)

        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        self.assertEqual(obs, exp)

        obs = prep_template_ajax_get_req('*****@*****.**', 1)
        exp['editable'] = False
        self.assertEqual(obs, exp)