Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 4,619 for Test (0.29 sec)

  1. docs_src/app_testing/app_b/test_main.py

    from .main import app
    
    client = TestClient(app)
    
    
    def test_read_item():
        response = client.get("/items/foo", headers={"X-Token": "coneofsilence"})
        assert response.status_code == 200
        assert response.json() == {
            "id": "foo",
            "title": "Foo",
            "description": "There goes my hero",
        }
    
    
    def test_read_item_bad_token():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_files/test_tutorial003.py

                files=(
                    ("files", ("test.txt", file)),
                    ("files", ("test2.txt", file2)),
                ),
            )
        assert response.status_code == 200, response.text
        assert response.json() == {"file_sizes": [14, 15]}
    
    
    def test_post_upload_file(tmp_path):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
        path2 = tmp_path / "test2.txt"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/envoy/configdump/secret_test.go

    	"io"
    	"os"
    	"testing"
    
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestSDSWriter_ValidCert(t *testing.T) {
    	configDumpFile, err := os.Open("testdata/secret/config_dump.json")
    	if err != nil {
    		t.Errorf("error opening test data file: %v", err)
    	}
    	defer configDumpFile.Close()
    	configDump, err := io.ReadAll(configDumpFile)
    	if err != nil {
    		t.Errorf("error reading test data file: %v", err)
    	}
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Jun 06 15:14:48 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_events/test_tutorial003.py

    from fastapi.testclient import TestClient
    
    from docs_src.events.tutorial003 import (
        app,
        fake_answer_to_everything_ml_model,
        ml_models,
    )
    
    
    def test_events():
        assert not ml_models, "ml_models should be empty"
        with TestClient(app) as client:
            assert ml_models["answer_to_everything"] == fake_answer_to_everything_ml_model
            response = client.get("/predict", params={"x": 2})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  5. cni/pkg/install/cniconfig_test.go

    package install
    
    import (
    	"context"
    	"os"
    	"path/filepath"
    	"testing"
    	"time"
    
    	"istio.io/istio/cni/pkg/config"
    	testutils "istio.io/istio/pilot/test/util"
    	"istio.io/istio/pkg/file"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestGetDefaultCNINetwork(t *testing.T) {
    	tempDir := t.TempDir()
    
    	cases := []struct {
    		name            string
    		dir             string
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed May 17 02:22:22 GMT 2023
    - 15.4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dataclasses/test_tutorial002.py

    client = TestClient(app)
    
    
    def test_get_item():
        response = client.get("/items/next")
        assert response.status_code == 200
        assert response.json() == {
            "name": "Island In The Moon",
            "price": 12.99,
            "description": "A place to be be playin' and havin' fun",
            "tags": ["breater"],
            "tax": None,
        }
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  7. internal/event/arn_test.go

    		data, err := xml.Marshal(testCase.arn)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    			if !reflect.DeepEqual(data, testCase.expectedData) {
    				t.Fatalf("test %v: data: expected: %v, got: %v", i+1, string(testCase.expectedData), string(data))
    			}
    		}
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  8. .github/workflows/test-redistribute.yml

    name: Test Redistribute
    
    on:
      push:
        branches:
          - master
      pull_request:
        types:
          - opened
          - synchronize
    
    jobs:
      test-redistribute:
        runs-on: ubuntu-latest
        steps:
          - name: Dump GitHub context
            env:
              GITHUB_CONTEXT: ${{ toJson(github) }}
            run: echo "$GITHUB_CONTEXT"
          - uses: actions/checkout@v4
          - name: Set up Python
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 28 23:28:07 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dependencies/test_tutorial008d.py

        client = TestClient(app)
        return client
    
    
    def test_get_no_item(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
    
    
    def test_get(client: TestClient):
        response = client.get("/items/plumbus")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  10. .github/ISSUE_TEMPLATE/failing-test.yaml

    name: Failing Test
    description: Report continuously failing tests or jobs in Kubernetes CI
    labels: kind/failing-test
    body:
      - type: textarea
        id: jobs
        attributes:
          label: Which jobs are failing?
          placeholder: |
            Please only use this template for submitting reports about continuously failing tests or jobs in Kubernetes CI.
        validations:
          required: true
    
      - type: textarea
        id: tests
        attributes:
    Others
    - Registered: Fri Apr 26 09:05:10 GMT 2024
    - Last Modified: Tue Oct 05 16:55:38 GMT 2021
    - 1.1K bytes
    - Viewed (0)
Back to top