Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 41 - 50 of 59 for testChain (0.63 seconds)

  1. tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py

    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from docs_src.behind_a_proxy.tutorial001_py310 import app
    
    client = TestClient(app, root_path="/api/v1")
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi():
        response = client.get("/openapi.json")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1.2K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_behind_a_proxy/test_tutorial003.py

    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from docs_src.behind_a_proxy.tutorial003_py310 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1.5K bytes
    - Click Count (0)
  3. internal/dsync/dsync_test.go

    	testDrwMutexUnlockCallTimeout      = 250 * time.Millisecond
    	testDrwMutexForceUnlockCallTimeout = 250 * time.Millisecond
    	testDrwMutexRefreshInterval        = 100 * time.Millisecond
    )
    
    // TestMain initializes the testing framework
    func TestMain(m *testing.M) {
    	startLockServers()
    
    	// Initialize locker clients for dsync.
    	var clnts []NetLocker
    	for i := range nodes {
    		clnts = append(clnts, newClient(nodes[i].URL))
    	}
    
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 10.8K bytes
    - Click Count (0)
  4. src/cmd/api/api_test.go

    import (
    	"flag"
    	"fmt"
    	"go/build"
    	"internal/testenv"
    	"os"
    	"path/filepath"
    	"slices"
    	"strings"
    	"sync"
    	"testing"
    )
    
    var flagCheck = flag.Bool("check", false, "run API checks")
    
    func TestMain(m *testing.M) {
    	flag.Parse()
    	for _, c := range contexts {
    		c.Compiler = build.Default.Compiler
    	}
    	build.Default.GOROOT = testenv.GOROOT(nil)
    
    	os.Exit(m.Run())
    }
    
    var (
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Mon Mar 02 13:20:41 GMT 2026
    - 7.6K bytes
    - Click Count (0)
  5. docs/ru/docs/advanced/settings.md

    Далее будет очень просто предоставить другой объект настроек во время тестирования, создав переопределение зависимости для `get_settings`:
    
    {* ../../docs_src/settings/app02_an_py310/test_main.py hl[9:10,13,21] *}
    
    В переопределении зависимости мы задаем новое значение `admin_email` при создании нового объекта `Settings`, а затем возвращаем этот новый объект.
    
    После этого можно протестировать, что он используется.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 16.5K bytes
    - Click Count (0)
  6. docs/de/docs/advanced/settings.md

    Dann wäre es sehr einfach, beim Testen ein anderes Einstellungsobjekt bereitzustellen, indem man eine Abhängigkeitsüberschreibung für `get_settings` erstellt:
    
    {* ../../docs_src/settings/app02_an_py310/test_main.py hl[9:10,13,21] *}
    
    Bei der Abhängigkeitsüberschreibung legen wir einen neuen Wert für `admin_email` fest, wenn wir das neue `Settings`-Objekt erstellen, und geben dann dieses neue Objekt zurück.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 12.5K bytes
    - Click Count (0)
  7. docs/fr/docs/advanced/settings.md

    Il devient alors très simple de fournir un autre objet de paramètres pendant les tests en créant une surcharge de dépendance pour `get_settings` :
    
    {* ../../docs_src/settings/app02_an_py310/test_main.py hl[9:10,13,21] *}
    
    Dans la surcharge de dépendance, nous définissons une nouvelle valeur pour `admin_email` lors de la création du nouvel objet `Settings`, puis nous renvoyons ce nouvel objet.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 12.3K bytes
    - Click Count (0)
  8. docs/es/docs/advanced/settings.md

    Luego sería muy fácil proporcionar un objeto de configuraciones diferente durante las pruebas al crear una sobrescritura de dependencia para `get_settings`:
    
    {* ../../docs_src/settings/app02_an_py310/test_main.py hl[9:10,13,21] *}
    
    En la sobrescritura de dependencia establecemos un nuevo valor para el `admin_email` al crear el nuevo objeto `Settings`, y luego devolvemos ese nuevo objeto.
    
    Luego podemos probar que se está usando.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 11.7K bytes
    - Click Count (0)
  9. docs/tr/docs/advanced/settings.md

    ### Ayarlar ve test { #settings-and-testing }
    
    Ardından, `get_settings` için bir dependency override oluşturarak test sırasında farklı bir settings nesnesi sağlamak çok kolay olur:
    
    {* ../../docs_src/settings/app02_an_py310/test_main.py hl[9:10,13,21] *}
    
    Dependency override içinde, yeni `Settings` nesnesini oluştururken `admin_email` için yeni bir değer ayarlarız ve sonra bu yeni nesneyi döndürürüz.
    
    Sonrasında bunun kullanıldığını test edebiliriz.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 11.8K bytes
    - Click Count (0)
  10. docs/ko/docs/advanced/settings.md

    ### 설정과 테스트 { #settings-and-testing }
    
    그 다음, `get_settings`에 대한 의존성 override를 만들어 테스트 중에 다른 설정 객체를 제공하기가 매우 쉬워집니다:
    
    {* ../../docs_src/settings/app02_an_py310/test_main.py hl[9:10,13,21] *}
    
    의존성 override에서는 새 `Settings` 객체를 생성할 때 `admin_email`의 새 값을 설정하고, 그 새 객체를 반환합니다.
    
    그 다음 그것이 사용되는지 테스트할 수 있습니다.
    
    ## `.env` 파일 읽기 { #reading-a-env-file }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 11.9K bytes
    - Click Count (0)
Back to Top