from fastapi.testclient import TestClient
from grav_bridge_i.web import app

def test_status_and_validation_endpoints():
    client = TestClient(app)
    r = client.get('/api/status')
    assert r.status_code == 200
    assert r.json()['ready'] is True
    v = client.post('/api/validate')
    assert v.status_code == 200
    assert v.json()['galaxies'] == 121
