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

19 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-23 05:22 +0000

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

2 

3 

4class MockResponse: 

5 VARS_CHARYBDIS_URL = 'https://my.little.charybdis' 

6 VARS_KB_URL = 'https://all.the.knowledge' 

7 

8 def __init__(self, url: str): 

9 self.url = url 

10 self.status_code = 200 

11 

12 def json(self): 

13 print(self.url) 

14 match self.url: 

15 case 'https://my.little.charybdis/query/dive/Deep%20Discoverer%2023060001': 

16 return ex_23060001 

17 case 'https://my.little.charybdis/query/dive/Deep%20Discoverer%2023060002': 

18 return ex_23060002 

19 case 'https://all.the.knowledge/phylogeny/up/Pomacentridae': 

20 return pomacentridae 

21 case 'https://all.the.knowledge/phylogeny/up/Hydroidolina': 

22 return hydroidolina 

23 return {}