Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_static_files (0.08 sec)

  1. tests/test_tutorial/test_static_files/test_tutorial001.py

        from docs_src.static_files.tutorial001_py39 import app
    
        with TestClient(app) as client:
            yield client
        sample_file.unlink()
        static_dir.rmdir()
    
    
    def test_static_files(client: TestClient):
        response = client.get("/static/sample.txt")
        assert response.status_code == 200, response.text
        assert response.text == "This is a sample static file."
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.1K bytes
    - Viewed (0)
Back to top