From 1cf06585c2b2006088a1d1194a51d54a1cb5e597 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 26 Jan 2022 09:16:50 -0700 Subject: [PATCH 1/3] fix failing tests --- qiita_pet/handlers/api_proxy/tests/test_prep_template.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qiita_pet/handlers/api_proxy/tests/test_prep_template.py b/qiita_pet/handlers/api_proxy/tests/test_prep_template.py index 2394c5eb2..9068b937a 100644 --- a/qiita_pet/handlers/api_proxy/tests/test_prep_template.py +++ b/qiita_pet/handlers/api_proxy/tests/test_prep_template.py @@ -269,7 +269,7 @@ def test_prep_template_summary_get_req(self): ('target_gene', [('16S rRNA', 27)]), ('target_subfragment', [('V4', 27)])], 'status': 'success', 'message': '', 'editable': True} - self.assertEqual(obs, exp) + self.assertDictEqual(obs, exp) def test_prep_template_summary_get_req_no_access(self): obs = prep_template_summary_get_req(1, 'demo@microbio.me') @@ -463,6 +463,8 @@ def test_prep_template_post_req(self): 'file': 'update.txt', 'id': 'ignored in test'} + print (obs['message'].split('\n')) + print (exp['message']) self.assertCountEqual(obs['message'].split('\n'), exp['message']) self.assertEqual(obs['status'], exp['status']) self.assertEqual(obs['file'], exp['file']) From 7298805679fc7a5959fb31517d700e0ddfd3d4fc Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 26 Jan 2022 12:50:27 -0700 Subject: [PATCH 2/3] debug prints --- qiita_pet/handlers/api_proxy/tests/test_prep_template.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qiita_pet/handlers/api_proxy/tests/test_prep_template.py b/qiita_pet/handlers/api_proxy/tests/test_prep_template.py index 9068b937a..74618e722 100644 --- a/qiita_pet/handlers/api_proxy/tests/test_prep_template.py +++ b/qiita_pet/handlers/api_proxy/tests/test_prep_template.py @@ -269,6 +269,8 @@ def test_prep_template_summary_get_req(self): ('target_gene', [('16S rRNA', 27)]), ('target_subfragment', [('V4', 27)])], 'status': 'success', 'message': '', 'editable': True} + print(obs) + print(exp) self.assertDictEqual(obs, exp) def test_prep_template_summary_get_req_no_access(self): @@ -451,7 +453,7 @@ def test_prep_template_post_req(self): exp = {'status': 'warning', 'message': [ 'Both a converter and dtype were specified for column ' - 'sample_name - only the converter will be used', 'Some ' + 'sample_name - only the converter will be used.', 'Some ' 'functionality will be disabled due to missing columns:', '\tEBI submission disabled: center_name, ' 'experiment_design_description, instrument_model, ' @@ -463,8 +465,8 @@ def test_prep_template_post_req(self): 'file': 'update.txt', 'id': 'ignored in test'} - print (obs['message'].split('\n')) - print (exp['message']) + print(obs['message'].split('\n')) + print(exp['message']) self.assertCountEqual(obs['message'].split('\n'), exp['message']) self.assertEqual(obs['status'], exp['status']) self.assertEqual(obs['file'], exp['file']) From 080f0c1f9b09087ba1cd8accb573f233a40289ee Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 27 Jan 2022 06:56:29 -0700 Subject: [PATCH 3/3] fix tests --- qiita_pet/handlers/api_proxy/tests/test_prep_template.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qiita_pet/handlers/api_proxy/tests/test_prep_template.py b/qiita_pet/handlers/api_proxy/tests/test_prep_template.py index 74618e722..b8300c9d4 100644 --- a/qiita_pet/handlers/api_proxy/tests/test_prep_template.py +++ b/qiita_pet/handlers/api_proxy/tests/test_prep_template.py @@ -235,7 +235,7 @@ def test_prep_template_summary_get_req(self): ('TCGACCAAACAC', 1), ('TGAGTGGTCTGT', 1), ('TGCTACAGACGT', 1), ('TGGTTATGGCAC', 1), ('TTGCACCGTCGA', 1)]), ('center_name', [('ANL', 27)]), - ('center_project_name', [('nan', 27)]), + ('center_project_name', [('None', 27)]), ('emp_status', [('EMP', 27)]), ('experiment_center', [('ANL', 27)]), ('experiment_design_description', [('micro biome of soil and ' @@ -269,8 +269,6 @@ def test_prep_template_summary_get_req(self): ('target_gene', [('16S rRNA', 27)]), ('target_subfragment', [('V4', 27)])], 'status': 'success', 'message': '', 'editable': True} - print(obs) - print(exp) self.assertDictEqual(obs, exp) def test_prep_template_summary_get_req_no_access(self): @@ -464,9 +462,6 @@ def test_prep_template_post_req(self): 'description of these fields.'], 'file': 'update.txt', 'id': 'ignored in test'} - - print(obs['message'].split('\n')) - print(exp['message']) self.assertCountEqual(obs['message'].split('\n'), exp['message']) self.assertEqual(obs['status'], exp['status']) self.assertEqual(obs['file'], exp['file'])