def test_sample_template_meta_cats_get_req_no_access(self): obs = sample_template_meta_cats_get_req(1, '*****@*****.**') exp = { 'status': 'error', 'message': 'User does not have access to study' } self.assertEqual(obs, exp)
def test_sample_template_meta_cats_get_req_no_template(self): obs = sample_template_meta_cats_get_req(self.new_study.id, '*****@*****.**') self.assertEqual( obs, { 'status': 'error', 'message': 'Sample template %d does not ' 'exist' % self.new_study.id })
def test_sample_template_meta_cats_get_req(self): obs = sample_template_meta_cats_get_req(1, '*****@*****.**') exp = {'status': 'success', 'message': '', 'categories': [ 'altitude', 'anonymized_name', 'assigned_from_geo', 'collection_timestamp', 'common_name', 'country', 'depth', 'description', 'description_duplicate', 'dna_extracted', 'elevation', 'env_biome', 'env_feature', 'host_subject_id', 'host_taxid', 'latitude', 'longitude', 'ph', 'physical_specimen_location', 'physical_specimen_remaining', 'samp_salinity', 'sample_type', 'scientific_name', 'season_environment', 'taxon_id', 'temp', 'texture', 'tot_nitro', 'tot_org_carb', 'water_content_soil']} self.assertEqual(obs, exp)
def test_sample_template_meta_cats_get_req(self): obs = sample_template_meta_cats_get_req(1, '*****@*****.**') exp = {'status': 'success', 'message': '', 'categories': [ 'altitude', 'anonymized_name', 'assigned_from_geo', 'collection_timestamp', 'common_name', 'country', 'depth', 'description', 'description_duplicate', 'dna_extracted', 'elevation', 'env_biome', 'env_feature', 'env_package', 'host_subject_id', 'host_taxid', 'latitude', 'longitude', 'ph', 'physical_specimen_location', 'physical_specimen_remaining', 'samp_salinity', 'sample_type', 'scientific_name', 'season_environment', 'taxon_id', 'temp', 'texture', 'tot_nitro', 'tot_org_carb', 'water_content_soil']} self.assertEqual(obs, exp)
def test_sample_template_meta_cats_get_req(self): obs = sample_template_meta_cats_get_req(1, "*****@*****.**") exp = { "status": "success", "message": "", "categories": [ "altitude", "anonymized_name", "assigned_from_geo", "collection_timestamp", "common_name", "country", "depth", "description", "description_duplicate", "dna_extracted", "elevation", "env_biome", "env_feature", "host_subject_id", "host_taxid", "latitude", "longitude", "ph", "physical_specimen_location", "physical_specimen_remaining", "samp_salinity", "sample_type", "scientific_name", "season_environment", "taxon_id", "temp", "texture", "tot_nitro", "tot_org_carb", "water_content_soil", ], } self.assertEqual(obs, exp)
def test_sample_template_meta_cats_get_req_no_template(self): obs = sample_template_meta_cats_get_req(self.new_study.id, "*****@*****.**") self.assertEqual( obs, {"status": "error", "message": "Sample template %d does not " "exist" % self.new_study.id} )
def test_sample_template_meta_cats_get_req_no_access(self): obs = sample_template_meta_cats_get_req(1, "*****@*****.**") exp = {"status": "error", "message": "User does not have access to study"} self.assertEqual(obs, exp)
def test_sample_template_meta_cats_get_req_no_template(self): obs = sample_template_meta_cats_get_req(self.new_study.id, '*****@*****.**') self.assertEqual(obs, {'status': 'error', 'message': 'Sample template %d does not ' 'exist' % self.new_study.id})
def test_sample_template_meta_cats_get_req_no_access(self): obs = sample_template_meta_cats_get_req(1, '*****@*****.**') exp = {'status': 'error', 'message': 'User does not have access to study'} self.assertEqual(obs, exp)