Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 80 for and (0.15 sec)

  1. tests/test_reponse_set_reponse_code_empty.py

        return {"msg": "Status overwritten", "id": id}
    
    
    client = TestClient(app)
    
    
    def test_dependency_set_status_code():
        response = client.delete("/1")
        assert response.status_code == 400 and response.content
        assert response.json() == {"msg": "Status overwritten", "id": 1}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py

                data = websocket.receive_text()
                assert data == f"Message text was: {message}, for item ID: bar"
    
    
    @needs_py310
    def test_websocket_with_header_and_query(app: FastAPI):
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/2/ws?q=3&token=some-token") as websocket:
                message = "Message one"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_schema_extra_example/test_tutorial004.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.schema_extra_example.tutorial004 import app
    
    client = TestClient(app)
    
    
    # Test required and embedded body parameters with no bodies sent
    def test_post_body_example():
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.9K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_schema_extra_example/test_tutorial004_py310.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.schema_extra_example.tutorial004_py310 import app
    
        client = TestClient(app)
        return client
    
    
    # Test required and embedded body parameters with no bodies sent
    @needs_py310
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_dataclasses/test_tutorial003.py

            {
                "name": "Breaters",
                "items": [
                    {
                        "name": "Island In The Moon",
                        "description": "A place to be be playin' and havin' fun",
                    },
                    {"name": "Holy Buddies", "description": None},
                ],
            },
            {
                "name": "System of an Up",
                "items": [
                    {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  6. tests/test_sub_callbacks.py

    def create_invoice(invoice: Invoice, callback_url: Optional[HttpUrl] = None):
        """
        Create an invoice.
    
        This will (let's imagine) let the API user (some external developer) create an
        invoice.
    
        And this path operation will:
    
        * Send the invoice to the client.
        * Collect the money from the client.
        * Send a notification back to the API user (the external developer), as a callback.
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  7. tensorflow/api_template_v1.__init__.py

    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    # ==============================================================================
    """Bring in all of the public TensorFlow interface into this module."""
    
    import distutils as _distutils
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jan 23 02:14:00 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  8. fastapi/openapi/models.py

        else_: Optional["SchemaOrBool"] = Field(default=None, alias="else")
        dependentSchemas: Optional[Dict[str, "SchemaOrBool"]] = None
        prefixItems: Optional[List["SchemaOrBool"]] = None
        # TODO: uncomment and remove below when deprecating Pydantic v1
        # It generales a list of schemas for tuples, before prefixItems was available
        # items: Optional["SchemaOrBool"] = None
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  9. configure.py

      # previous instances, so we need to build up a complete list and write a
      # single list of filters for the .bazelrc file.
    
      # Filters to use with both --test_tag_filters and --build_tag_filters
      test_and_build_filters = ['-benchmark-test', '-no_oss', '-oss_excluded']
      # Additional filters for --test_tag_filters beyond those in
      # test_and_build_filters
      test_only_filters = ['-oss_serial']
      if is_windows():
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  10. fastapi/routing.py

                    "application code is raising an exception and a dependency with yield "
                    "has a block with a bare except, or a block with except Exception, "
                    "and is not raising the exception again. Read more about it in the "
                    "docs: https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-except"
                )
            return response
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
Back to top