MyReason92 / Project01

0 stars 0 forks source link

Unit Tests for the API #1

Open MyReason92 opened 3 months ago

MyReason92 commented 3 months ago

import pytest from app import app

def test_api_response(): client = app.test_client() response = client.get('/predict?country=USA&date=2024-07-05') assert response.status_code == 200 assert 'prediction' in response.json