def setUp(self): """ Create initial objects for testing """ self.test_user = User(username='******', password=get_random_string(length=32)) self.test_user.save() self.tb_test_user = TBUser(user=self.test_user, affiliation='HU') self.tb_test_user.save() test_params = {u'status':\ PredictDatasetStatus.objects.get(pk=DATASET_STATUS_FILE_RETRIEVAL_COMPLETE),\ u'has_prediction': False,\ u'description': u'ok',\ u'file_type': u'vcf',\ u'title': u'vcf - embed',\ u'file_directory':\ u'/some-dir-to-add-files/test_setup/tb_uploaded_files/tbdata_00000013',\ u'fastq_type': u'',\ u'dropbox_url': \ u'https://www.dropbox.com/sh/p6ses8376312bes/AAA7TB4GhErfLLfE7WPco79ha?dl=0',\ u'user': self.tb_test_user} self.dataset_vcf = PredictDataset(**test_params) self.dataset_vcf.save() test_params2 = test_params.copy() test_params2['file_type'] = FILE_TYPE_FASTQ test_params2['fastq_type'] = FASTQ_PAIR_ENDED self.dataset_fastq = PredictDataset(**test_params2) self.dataset_fastq.save() script_dirname = join(dirname(realpath(__file__)), 'test_script_dir') self.pipleline_scripts_info = PipelineScriptsDirectory(name='test dir',\ script_directory=script_dirname) self.pipleline_scripts_info.save()
def setUp(self): """ Create initial objects for testing """ super(PredictBasicTest, self).setUp() self.test_user = User(username='******', password=get_random_string(length=32)) self.test_user.save() test_params = { u'description': u'ok',\ u'file_type': u'vcf',\ u'title': u'vcf - embed',\ u'file_directory':\ u'/some-dir-to-add-files/test_setup/tb_uploaded_files/tbdata_00000013',\ u'user': self.test_user} self.dataset_vcf = PredictDataset(**test_params) self.dataset_vcf.save() test_params2 = test_params.copy() test_params2['file_type'] = FILE_TYPE_FASTQ self.dataset_fastq = PredictDataset(**test_params2) self.dataset_fastq.save()