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.") 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)