- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 21 for get_app (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/test_tutorial/test_settings/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient from pytest import MonkeyPatch @pytest.fixture(name="app", params=[pytest.param("tutorial001_py39")]) def get_app(request: pytest.FixtureRequest, monkeypatch: MonkeyPatch): monkeypatch.setenv("ADMIN_EMAIL", "******@****.***") mod = importlib.import_module(f"docs_src.settings.{request.param}") return mod.app def test_settings(app):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 690 bytes - Click Count (0) -
tests/test_tutorial/test_request_files/test_tutorial003.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture( name="app", params=[ "tutorial003_py39", "tutorial003_an_py39", ], ) def get_app(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.request_files.{request.param}") return mod.app @pytest.fixture(name="client") def get_client(app: FastAPI):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 7.5K bytes - Click Count (0) -
tests/test_tutorial/test_websockets/test_tutorial002.py
pytest.param("tutorial002_py310", marks=needs_py310), pytest.param("tutorial002_an_py39"), pytest.param("tutorial002_an_py310", marks=needs_py310), ], ) def get_app(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.websockets.{request.param}") return mod.app def test_main(app: FastAPI): client = TestClient(app)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 4.1K bytes - Click Count (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture( name="app", params=[ "tutorial001_py39", "tutorial001_an_py39", ], ) def get_app(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.request_forms_and_files.{request.param}") return mod.app @pytest.fixture(name="client") def get_client(app: FastAPI):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 7.3K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/MapEntrySetTester.java
while (entryItr.hasNext()) { Entry<K, V> entry = entryItr.next(); entry.setValue(e3().getValue()); entryItr.remove(); } assertTrue(getMap().isEmpty()); } public void testContainsEntryWithIncomparableKey() { try { assertFalse(getMap().entrySet().contains(mapEntry(IncomparableType.INSTANCE, v0()))); } catch (ClassCastException acceptable) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Dec 16 03:23:31 GMT 2025 - 7.5K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapEntrySetTester.java
while (entryItr.hasNext()) { Entry<K, V> entry = entryItr.next(); entry.setValue(e3().getValue()); entryItr.remove(); } assertTrue(getMap().isEmpty()); } public void testContainsEntryWithIncomparableKey() { try { assertFalse(getMap().entrySet().contains(mapEntry(IncomparableType.INSTANCE, v0()))); } catch (ClassCastException acceptable) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Dec 16 03:23:31 GMT 2025 - 7.5K bytes - Click Count (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapPutIfAbsentTester.java
"putIfAbsent(notPresent, value) should return null", getMap().putIfAbsent(k3(), v3())); expectAdded(e3()); } @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testPutIfAbsent_supportedPresent() { assertEquals( "putIfAbsent(present, value) should return existing value", v0(), getMap().putIfAbsent(k0(), v3())); expectUnchanged(); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 16 02:04:51 GMT 2025 - 5.3K bytes - Click Count (0) -
tests/test_tutorial/test_wsgi/test_tutorial001.py
client = TestClient(app) def test_flask(): response = client.get("/v1/") assert response.status_code == 200, response.text assert response.text == "Hello, World from Flask!" def test_app(): response = client.get("/v2") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 441 bytes - Click Count (1) -
tests/test_openapi_servers.py
}, {"url": "https://prod.example.com"}, ] ) @app.get("/foo") def foo(): return {"message": "Hello World"} client = TestClient(app) def test_app(): response = client.get("/foo") assert response.status_code == 200, response.text def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.textCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 1.7K bytes - Click Count (0) -
docs_src/settings/app02_py39/test_main.py
client = TestClient(app) def get_settings_override(): return Settings(admin_email="******@****.***") app.dependency_overrides[get_settings] = get_settings_override def test_app(): response = client.get("/info") data = response.json() assert data == { "app_name": "Awesome API", "admin_email": "******@****.***", "items_per_user": 50,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 515 bytes - Click Count (0)