From 1924b65a8ebc14072cefe380dd65a87152bfa6aa Mon Sep 17 00:00:00 2001 From: Anjala Katuri Date: Fri, 2 Jun 2023 19:23:27 -0600 Subject: [PATCH] admin/mail get and post --- tests/test_admin.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_admin.py b/tests/test_admin.py index d713c766..691f72c6 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py @@ -37,18 +37,18 @@ def test_admin1(self): # #compare_get_request_json_list("admin/log", headers = {"Accept":"text/plain"}, test_type = test_type, fields=["level", "line"]) # test_print("test_admin_log completed") - # test_print("test_admin_mail starting") - # #will throw error until we get a response from SBH3 - # #compare_get_request_json("/admin/mail", headers = {"Accept":"text/plain"}, test_type = test_type, fields=["sendGridApiKey", "sendGridFromEmail"]) - # test_print("test_admin_mail completed") - - # test_print("test_post_admin_mail starting") - # data={ - # 'key': 'SG.Dummy_Token', - # 'fromEmail' : 'synbiohub@synbiohub.utah.edu', - # } - # compare_post_request("/admin/mail", data, headers = {"Accept": "text/plain"}, test_name = "admin_mail", test_type = test_type) - # test_print("test_post_admin_mail completed") + test_print("test_admin_mail starting") + #will throw error until we get a response from SBH3 + compare_get_request_json("/admin/mail", headers = {"Accept":"text/plain"}, test_type = test_type, fields=["sendGridApiKey", "sendGridFromEmail"]) + test_print("test_admin_mail completed") + + test_print("test_post_admin_mail starting") + data={ + 'key': 'SG.Dummy_Token', + 'fromEmail' : 'synbiohub@synbiohub.utah.edu', + } + compare_post_request("/admin/mail", data, headers = {"Accept": "text/plain"}, test_name = "admin_mail", test_type = test_type) + test_print("test_post_admin_mail completed") test_print("test_admin_plugins starting") compare_get_request_json("/admin/plugins", headers = {"Accept":"text/plain"}, test_type = test_type, fields=["rendering", "download", "submit"])