- Sort Score
- Result 10 results
- Languages All
Results 1011 - 1020 of 1,755 for Gson (0.05 sec)
-
tests/test_router_events.py
assert state.router_shutdown is False assert state.sub_router_shutdown is False response = client.get("/") assert response.status_code == 200, response.text assert response.json() == {"message": "Hello World"} assert state.app_startup is True assert state.router_startup is True assert state.sub_router_startup is True assert state.app_shutdown is True
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:09:52 UTC 2024 - 7.3K bytes - Viewed (0) -
internal/pubsub/pubsub.go
// // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package pubsub import ( "bytes" "encoding/json" "fmt" "sync" "sync/atomic" ) // GetByteBuffer returns a byte buffer from the pool. var GetByteBuffer = func() []byte { return make([]byte, 0, 4096) } // Sub - subscriber entity.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 16:57:30 UTC 2024 - 5.2K bytes - Viewed (0) -
cni/pkg/nodeagent/cni-watcher_test.go
PodNamespace: "funkyns", } payload, _ := json.Marshal(valid) addEvent, err := processAddEvent(payload) assert.NoError(t, err) assert.Equal(t, valid, addEvent) } func TestProcessAddEventBadPayload(t *testing.T) { valid := CNIPluginAddEvent{ Netns: "/var/netns/foo", PodName: "pod-bingo", PodNamespace: "funkyns", } payload, _ := json.Marshal(valid)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Oct 09 16:05:45 UTC 2024 - 7.6K bytes - Viewed (0) -
docs_src/metadata/tutorial002.py
from fastapi import FastAPI app = FastAPI(openapi_url="/api/v1/openapi.json") @app.get("/items/") async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 02 04:55:20 UTC 2020 - 154 bytes - Viewed (0) -
internal/store/queuestore.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package store import ( "bytes" "encoding/json" "errors" "os" "path/filepath" "sort" "sync" "time" "github.com/google/uuid" jsoniter "github.com/json-iterator/go" "github.com/klauspost/compress/s2" "github.com/valyala/bytebufferpool" ) const ( defaultLimit = 100000 // Default store limit.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.6K bytes - Viewed (0) -
tests/test_tutorial/test_cors/test_tutorial001.py
assert response.status_code == 200, response.text assert response.json() == {"message": "Hello World"} assert ( response.headers["access-control-allow-origin"] == "https://localhost.tiangolo.com" ) # Test non-CORS response response = client.get("/") assert response.status_code == 200, response.text assert response.json() == {"message": "Hello World"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py
assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} @needs_py39 def test_get(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus" @needs_py39 def test_fastapi_error(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_datetime_custom_encoder.py
@app.get("/model", response_model=ModelWithDatetimeField) def get_model(): return model client = TestClient(app) with client: response = client.get("/model") assert response.json() == {"dt_field": "2019-01-01T08:00:00+00:00"} # TODO: remove when deprecating Pydantic v1 @needs_pydanticv1 def test_pydanticv1(): class ModelWithDatetimeField(BaseModel): dt_field: datetime
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.6K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial006b.py
assert response.status_code == 307 assert response.headers["location"] == "https://fastapi.tiangolo.com" def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/fastapi": { "get": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 899 bytes - Viewed (0) -
docs/ko/docs/tutorial/body-nested-models.md
{!../../docs_src/body_nested_models/tutorial005.py!} ``` 이 문자열이 유효한 URL인지 검사하고 JSON 스키마/OpenAPI로 문서화 됩니다. ## 서브모델 리스트를 갖는 어트리뷰트 `list`, `set` 등의 서브타입으로 Pydantic 모델을 사용할 수도 있습니다: ```Python hl_lines="20" {!../../docs_src/body_nested_models/tutorial006.py!} ``` 아래와 같은 JSON 본문으로 예상(변환, 검증, 문서화 등을)합니다: ```JSON hl_lines="11" { "name": "Foo", "description": "The pretender",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.6K bytes - Viewed (0)