Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for Truong (0.16 sec)

  1. tests/test_ws_router.py

        ) as websocket:
            data = websocket.receive_text()
            assert data == "path/to/file"
            data = websocket.receive_text()
            assert data == "a_query_param"
    
    
    def test_wrong_uri():
        """
        Verify that a websocket connection to a non-existent endpoing returns in a shutdown
        """
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect) as e:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body/test_tutorial001_py310.py

        assert response.json() == {
            "name": "Foo",
            "description": None,
            "price": 50.5,
            "tax": None,
        }
    
    
    @needs_py310
    def test_wrong_headers(client: TestClient):
        data = '{"name": "Foo", "price": 50.5}'
        response = client.post(
            "/items/", content=data, headers={"Content-Type": "text/plain"}
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
  3. tests/test_tutorial/test_body/test_tutorial001.py

        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "Foo",
            "description": None,
            "price": 50.5,
            "tax": None,
        }
    
    
    def test_wrong_headers(client: TestClient):
        data = '{"name": "Foo", "price": 50.5}'
        response = client.post(
            "/items/", content=data, headers={"Content-Type": "text/plain"}
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (5)
Back to top