Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Glasser (0.17 sec)

  1. tests/test_custom_route_class.py

    )
    def test_get_path(path, expected_status, expected_response):
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_route_classes():
        routes = {}
        for r in app.router.routes:
            assert isinstance(r, Route)
            routes[r.path] = r
        assert getattr(routes["/a/"], "x_type") == "A"  # noqa: B009
    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_inherited_custom_class.py

            def serialize_a_uuid(self, v):
                return str(v)
    
        @app.get("/get_custom_class")
        def return_some_user():
            # Test that the fix also works for custom pydantic classes
            return SomeCustomClass(a_uuid=MyUuid("b8799909-f914-42de-91bc-95c819218d01"))
    
        client = TestClient(app)
    
        with client:
            response_simple = client.get("/fast_uuid")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3K bytes
    - Viewed (0)
Back to top