Skip to content

Commit

Permalink
Update GitHub workflows and remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Devasy23 committed Jan 11, 2024
1 parent 7a3938f commit 02c5876
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Pylint

on: [push]
on: [pull_request]

jobs:
build:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ jobs:
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Start FastAPI server
run: |
uvicorn main:app --reload &
sleep 10 # Give FastAPI some time to start
shell: bash
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
Empty file added main/__init__.py
Empty file.
File renamed without changes.
Empty file added testing/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions testing/test_register_face.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import requests
from fastapi.testclient import TestClient
from main import app
from main.main import app
import os

client = TestClient(app)
def test_register_face():
# Open a test image file in binary mode
IMAGEDIR = "test-faces/"
with open("test-faces/07c64ef1-b32e-4396-97ea-0894249d58ee.jpg", "rb") as image_file:
with open(".\\test-faces\\07c64ef1-b32e-4396-97ea-0894249d58ee.jpg", "rb") as image_file:
# Create a tuple with the file's name and its content
file_tuple = ("test_image.jpg", image_file.read())
# Create a dictionary with the file's data
Expand Down

0 comments on commit 02c5876

Please sign in to comment.