Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for test_sub (0.04 sec)

  1. tests/test_tutorial/test_encoder/test_tutorial001.py

        return module
    
    
    @pytest.fixture(name="client")
    def get_client(mod: ModuleType):
        client = TestClient(mod.app)
        return client
    
    
    def test_put(client: TestClient, mod: ModuleType):
        fake_db = mod.fake_db
    
        response = client.put(
            "/items/123",
            json={
                "title": "Foo",
                "timestamp": "2023-01-01T12:00:00",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_bigger_applications/test_main.py

        response = client.put("/items/foo", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    def test_put(client: TestClient):
        response = client.put(
            "/items/plumbus?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 200, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 21.3K bytes
    - Viewed (0)
Back to top