Skip to content

Commit

Permalink
Fixing static code checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lotif committed Feb 22, 2024
1 parent 5ac3972 commit a1c4d32
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --with "dev, test"
run: poetry install --with test
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Run Tests
run: |
Expand Down
1 change: 1 addition & 0 deletions florist/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Root folder for FLorist source code."""
1 change: 1 addition & 0 deletions florist/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Root folder for FLorist backend API."""
4 changes: 3 additions & 1 deletion florist/api/client.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
"""FLorist client FastAPI endpoints."""
from fastapi import FastAPI
from fastapi.responses import JSONResponse


app = FastAPI()


@app.get("/api/client/connect")
def connect() -> JSONResponse:
"""
Confirms the client is up and ready to accept instructions.
Confirm the client is up and ready to accept instructions.
:return: JSON `{"status": "ok"}`
"""
Expand Down
1 change: 1 addition & 0 deletions florist/tests/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Unit tests for FLorist backend API."""
2 changes: 2 additions & 0 deletions florist/tests/api/test_client.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"""Tests for FLorist's client FastAPI endpoints."""
import json

from florist.api import client


def test_connect() -> None:
"""Tests the client's connect endpoint."""
response = client.connect()

assert response.status_code == 200
Expand Down

0 comments on commit a1c4d32

Please sign in to comment.