Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 257 for MyTest (0.18 sec)

  1. mockwebserver-junit5/README.md

    method parameter. It will be shut down automatically after the test runs.
    
    ```
    class MyTest {
      @Test
      void test(MockWebServer server) {
        ...
      }
    }
    ```
    
    Alternately you may add the [MockWebServer] as a constructor parameter:
    
    ```
    class MyTest {
      private final MockWebServer server;
    
      MyTest(MockWebServer server) {
        this.server = server;
      }
    
      @Test
      void test() {
        ...
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  2. internal/s3select/sql/parser_test.go

    	// }
    }
    
    func TestParseSelectStatement(t *testing.T) {
    	exp, err := ParseSelectStatement("select _3,_1,_2 as 'mytest'  from S3object")
    	if err != nil {
    		t.Fatalf("parse alias sql error: %v", err)
    	}
    	if exp.selectAST.Expression.Expressions[2].As != "mytest" {
    		t.Fatalf("parse alias sql error: %s not equal %s", exp.selectAST.Expression.Expressions[2].As, err)
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  3. tests/test_invalid_path_param.py

    import pytest
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/{id}")
            def read_items(id: List[Item]):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
        with pytest.raises(AssertionError):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Jun 03 17:59:40 GMT 2019
    - 1.7K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_websockets/test_tutorial002.py

    def test_websocket_no_credentials():
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    def test_websocket_invalid_data():
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  5. tests/test_invalid_sequence_param.py

    from typing import Dict, List, Optional, Tuple
    
    import pytest
    from fastapi import FastAPI, Query
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: List[Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_websockets/test_tutorial002_py310.py

        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    @needs_py310
    def test_websocket_invalid_data(app: FastAPI):
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  7. tests/test_validate_response_dataclass.py

        ]
    
    
    client = TestClient(app)
    
    
    def test_invalid():
        with pytest.raises(ResponseValidationError):
            client.get("/items/invalid")
    
    
    def test_double_invalid():
        with pytest.raises(ResponseValidationError):
            client.get("/items/innerinvalid")
    
    
    def test_invalid_list():
        with pytest.raises(ResponseValidationError):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py

        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    @needs_py310
    def test_websocket_invalid_data(app: FastAPI):
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/testing.md

    ## Tests ausführen
    
    Danach müssen Sie nur noch `pytest` installieren:
    
    <div class="termy">
    
    ```console
    $ pip install pytest
    
    ---> 100%
    ```
    
    </div>
    
    Es erkennt die Dateien und Tests automatisch, führt sie aus und berichtet Ihnen die Ergebnisse.
    
    Führen Sie die Tests aus, mit:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ================ test session starts ================
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:20:01 GMT 2024
    - 7K bytes
    - Viewed (0)
  10. tests/test_datastructures.py

    from typing import List
    
    import pytest
    from fastapi import FastAPI, UploadFile
    from fastapi.datastructures import Default
    from fastapi.testclient import TestClient
    
    
    # TODO: remove when deprecating Pydantic v1
    def test_upload_file_invalid():
        with pytest.raises(ValueError):
            UploadFile.validate("not a Starlette UploadFile")
    
    
    def test_upload_file_invalid_pydantic_v2():
        with pytest.raises(ValueError):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 2K bytes
    - Viewed (0)
Back to top