parthasarathydNU / uber-ride-api

Create and get ride status
MIT License
2 stars 1 forks source link

Set up Integrations Tests for Locations API #2

Open parthasarathydNU opened 1 day ago

parthasarathydNU commented 1 day ago

In this issue, we build the API to create and manage locations.

Latest Test Suite Status: CI

Here we are testing the APis individually by mocking the data in the in memory object. The next stage would be to set up a database and set up integration tests to run as part of the push pipelines.

Current Location Object:

class LocationBase(BaseModel):
    id: UUID
    name: str = Field(..., min_length=1, max_length=100, description="Name of the location")
    latitude: float = Field(..., ge=-90, le=90, description="Latitude of the location")
    longitude: float = Field(..., ge=-180, le=180, description="Longitude of the location")

    @validator('name')
    def name_must_not_be_empty(cls, v):
        if not v.strip():
            raise ValueError('Name must not be empty or just whitespace')
        return v.strip()

Current APIs:

Image

parthasarathydNU commented 1 day ago

Waiting for #5 to complete