diff --git a/.gitignore.txt b/.gitignore.txt new file mode 100644 index 0000000000000000000000000000000000000000..cf28dc5bc8a38cd78678f7c6524e0f8634692dc7 --- /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 0000000000000000000000000000000000000000..b0b0fd51129e00310b35c9d000363e429b02ced4 --- /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