Coverage for test/util/mock_response.py: 100%

16 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-23 02:22 +0000

1from test.data.vars_responses import ex_23060001, ex_23060002, pomacentridae, hydroidolina 

2 

3 

4class MockResponse: 

5 def __init__(self, url: str): 

6 self.url = url 

7 self.status_code = 200 

8 

9 def json(self): 

10 match self.url: 

11 case 'http://hurlstor.soest.hawaii.edu:8086/query/dive/Deep%20Discoverer%2023060001': 

12 return ex_23060001 

13 case 'http://hurlstor.soest.hawaii.edu:8086/query/dive/Deep%20Discoverer%2023060002': 

14 return ex_23060002 

15 case 'http://hurlstor.soest.hawaii.edu:8083/v1/phylogeny/up/Pomacentridae': 

16 return pomacentridae 

17 case 'http://hurlstor.soest.hawaii.edu:8083/v1/phylogeny/up/Hydroidolina': 

18 return hydroidolina 

19 return {}