File size: 509 Bytes
7605e10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from fastapi.testclient import TestClient

from src.main import app

client = TestClient(app)


def test_get_root_redirects():
    response = client.get("/", follow_redirects=True)
    assert response.status_code == 200
    response = client.get("/", follow_redirects=False)
    assert response.status_code == 307
    assert response.headers["location"] == "/home"


def test_get_home():
    response = client.get("/home/")
    assert response.status_code == 200
    assert "marimo-filename" in response.text