the beginning of the idiots
This commit is contained in:
		
							
								
								
									
										22
									
								
								qwen/python/merchants_of_hope/tests/test_api.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								qwen/python/merchants_of_hope/tests/test_api.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
"""
 | 
			
		||||
Tests for API endpoints
 | 
			
		||||
"""
 | 
			
		||||
import pytest
 | 
			
		||||
from fastapi.testclient import TestClient
 | 
			
		||||
 | 
			
		||||
def test_root_endpoint(client):
 | 
			
		||||
    """Test root endpoint"""
 | 
			
		||||
    response = client.get("/")
 | 
			
		||||
    assert response.status_code == 200
 | 
			
		||||
    data = response.json()
 | 
			
		||||
    assert "message" in data
 | 
			
		||||
    assert "Welcome to MerchantsOfHope" in data["message"]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def test_health_endpoint(client):
 | 
			
		||||
    """Test health check endpoint"""
 | 
			
		||||
    response = client.get("/health")
 | 
			
		||||
    assert response.status_code == 200
 | 
			
		||||
    data = response.json()
 | 
			
		||||
    assert data["status"] == "healthy"
 | 
			
		||||
    assert "version" in data
 | 
			
		||||
		Reference in New Issue
	
	Block a user