From ad9c074a76ddd85e2acc4c562f1e90a020374133 Mon Sep 17 00:00:00 2001 From: asherpasha Date: Wed, 2 Oct 2024 16:59:48 -0400 Subject: [PATCH 1/2] Minor change. --- api/resources/efp_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/resources/efp_image.py b/api/resources/efp_image.py index 71c97ec..89df2e2 100644 --- a/api/resources/efp_image.py +++ b/api/resources/efp_image.py @@ -152,7 +152,7 @@ def get(self, species=""): # This will only work on the BAR if os.environ.get("BAR"): - if species in ["arabidopsis", "arachis", "cannabis", "maize", "sorghum", "soybean"]: + if species in ["arabidopsis", "arachis", "cannabis", "maize", "rice", "sorghum", "soybean"]: efp_base_path = "/var/www/html/efp_" + species + "/data" else: return BARUtils.error_exit("Invalid species.") From 2a3da6133130e52f42e0f2706f0ad14d23f3d43c Mon Sep 17 00:00:00 2001 From: asherpasha Date: Wed, 2 Oct 2024 17:04:04 -0400 Subject: [PATCH 2/2] Added llama3 test code. --- tests/resources/test_llama3.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/resources/test_llama3.py b/tests/resources/test_llama3.py index 8e5a5b4..43b2298 100644 --- a/tests/resources/test_llama3.py +++ b/tests/resources/test_llama3.py @@ -23,7 +23,12 @@ def test_get_llama(self): } self.assertEqual(response.json, expected) - # Gene does not exist + # Invalid gene id response = self.app_client.get("/LLaMA/XX3G18850") expected = {"wasSuccessful": False, "error": "Invalid gene id"} self.assertEqual(response.json, expected) + + # Gene does not exist + response = self.app_client.get("/LLaMA/AT3G18851") + expected = {"wasSuccessful": False, "error": "There are no data found for the given gene"} + self.assertEqual(response.json, expected)