From 5ef23a34a46cdf24f1f0861c0ac337700b3f5e9f Mon Sep 17 00:00:00 2001
From: local_comparaison <mathieu.umec@inrae.fr>
Date: Tue, 28 Nov 2023 15:15:58 +0100
Subject: [PATCH] ad .gitignore and test_MApping_using_the_API

---
 .gitignore.txt                                |  3 +++
 Tests_unitaires/test_Mapping_using_the_API.py | 25 +++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 .gitignore.txt
 create mode 100644 Tests_unitaires/test_Mapping_using_the_API.py

diff --git a/.gitignore.txt b/.gitignore.txt
new file mode 100644
index 0000000..cf28dc5
--- /dev/null
+++ b/.gitignore.txt
@@ -0,0 +1,3 @@
+/__pycache__
+
+.cpython-310
\ No newline at end of file
diff --git a/Tests_unitaires/test_Mapping_using_the_API.py b/Tests_unitaires/test_Mapping_using_the_API.py
new file mode 100644
index 0000000..b0b0fd5
--- /dev/null
+++ b/Tests_unitaires/test_Mapping_using_the_API.py
@@ -0,0 +1,25 @@
+import unittest
+import sys
+sys.path.append('C:\\Users\\mumec\\Desktop\\Dossier_gitlab_local\\traitement_des_données')
+import Mapping_using_the_API
+
+class TestMappingAPI(unittest.TestCase):
+
+   def test_send_request_to_Mapping_API(self):
+       result =Mapping_using_the_API.send_request_to_Mapping_API('https://rampdb.nih.gov/api/pathways-from-analytes',["hmdb:HMDB0000064"],{'Accept': '*/*','Content-Type': 'application/json'})
+       self.assertIsInstance(result, str)
+       self.assertNotEqual(len(result),0)
+
+       with self.assertRaises(ValueError):
+          Mapping_using_the_API.send_request_to_Mapping_API('https://rampdb.nih.gov/api/pathways-from-analytes',[],{'Accept': '*/*','Content-Type': 'application/json'})
+
+"""
+   def test_mapping_from_RAMP_API(self):
+
+
+   def test_excel_file_writer(self):
+"""
+
+
+if __name__=='__main__':
+    unittest.main()
\ No newline at end of file
-- 
GitLab