Merge modifications for more separate backend functions #69
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -36,7 +36,6 @@ def test_invalid_input(client, location, radius, status_code):    # pylint: disa
 | 
			
		||||
            "radius": radius
 | 
			
		||||
        }
 | 
			
		||||
    )
 | 
			
		||||
    print(response.json())
 | 
			
		||||
 | 
			
		||||
    # checks :
 | 
			
		||||
    assert response.status_code == status_code
 | 
			
		||||
@@ -64,7 +63,6 @@ def test_no_toilets(client, location, status_code):    # pylint: disable=redefin
 | 
			
		||||
            "location": location
 | 
			
		||||
        }
 | 
			
		||||
    )
 | 
			
		||||
    print(response.json())
 | 
			
		||||
    toilets_list = [Toilets.model_validate(toilet) for toilet in response.json()]
 | 
			
		||||
 | 
			
		||||
    # checks :
 | 
			
		||||
@@ -95,8 +93,6 @@ def test_toilets(client, location, status_code):    # pylint: disable=redefined-
 | 
			
		||||
            "radius" : 600
 | 
			
		||||
        }
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    print(response.json())
 | 
			
		||||
    toilets_list = [Toilets.model_validate(toilet) for toilet in response.json()]
 | 
			
		||||
 | 
			
		||||
    # checks :
 | 
			
		||||
 
 | 
			
		||||
@@ -70,6 +70,8 @@ class ToiletsManager:
 | 
			
		||||
 | 
			
		||||
        toilets_list = self.to_toilets(result)
 | 
			
		||||
 | 
			
		||||
        self.logger.debug(f'Found {len(toilets_list)} toilets around {self.location}')
 | 
			
		||||
 | 
			
		||||
        return toilets_list
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -39,4 +39,5 @@ def get_toilets(
 | 
			
		||||
    except KeyError as exc:
 | 
			
		||||
        raise HTTPException(status_code=404, detail="No toilets found") from exc
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    return toilets_list
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user