Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 3,707 for testy (0.14 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial003_py39.py

                "/uploadfiles/",
                files=(
                    ("files", ("test.txt", file)),
                    ("files", ("test2.txt", file2)),
                ),
            )
        assert response.status_code == 200, response.text
        assert response.json() == {"filenames": ["test.txt", "test2.txt"]}
    
    
    @needs_py39
    def test_get_root(app: FastAPI):
        client = TestClient(app)
        response = client.get("/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_files/test_tutorial002_py39.py

                files=(
                    ("files", ("test.txt", file)),
                    ("files", ("test2.txt", file2)),
                ),
            )
        assert response.status_code == 200, response.text
        assert response.json() == {"file_sizes": [14, 15]}
    
    
    @needs_py39
    def test_post_upload_file(tmp_path, app: FastAPI):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9K bytes
    - Viewed (0)
  3. internal/bucket/lifecycle/delmarker-expiration_test.go

    			var dexp DelMarkerExpiration
    			var fail bool
    			err := xml.Unmarshal([]byte(test.xml), &dexp)
    			if test.err == nil {
    				if err != nil {
    					fail = true
    				}
    			} else {
    				if err == nil {
    					fail = true
    				}
    				if test.err.Error() != err.Error() {
    					fail = true
    				}
    			}
    			if fail {
    				t.Fatalf("Expected %v but got %v", test.err, err)
    			}
    		})
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  4. tests/distinct_test.go

    package tests_test
    
    import (
    	"regexp"
    	"testing"
    
    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestDistinct(t *testing.T) {
    	users := []User{
    		*GetUser("distinct", Config{}),
    		*GetUser("distinct", Config{}),
    		*GetUser("distinct", Config{}),
    		*GetUser("distinct-2", Config{}),
    		*GetUser("distinct-3", Config{}),
    	}
    	users[0].Age = 20
    
    	if err := DB.Create(&users).Error; err != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 2.5K bytes
    - Viewed (0)
  5. cmd/object-handlers_test.go

    ) {
    	objectName := "test?object" // use file with ? to test URL parsing...
    	if runtime.GOOS == "windows" {
    		objectName = "test-object" // ...except on Windows
    	}
    	// object used for anonymous HTTP request test.
    	anonObject := "anon-object"
    	var err error
    	opts := ObjectOptions{}
    	// set of byte data for PutObject.
    	// object has to be created before running tests for Copy Object.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 160K bytes
    - Viewed (0)
  6. schema/index_test.go

    	CheckIndices(t, map[string]schema.Index{
    		"idx_index_tests_field_a": {
    			Name:   "idx_index_tests_field_a",
    			Fields: []schema.IndexOption{{Field: &schema.Field{Name: "FieldA", Unique: true}}},
    		},
    		"idx_index_tests_field_c": {
    			Name:   "idx_index_tests_field_c",
    			Class:  "UNIQUE",
    			Fields: []schema.IndexOption{{Field: &schema.Field{Name: "FieldC", UniqueIndex: "idx_index_tests_field_c"}}},
    		},
    		"idx_index_tests_field_d": {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 8K bytes
    - Viewed (0)
  7. internal/lock/lock_test.go

    	if err == nil {
    		t.Fatal("Should fail here")
    	}
    }
    
    // Tests lock directory fail.
    func TestLockDirFail(t *testing.T) {
    	d := t.TempDir()
    
    	_, err := LockedOpenFile(d, os.O_APPEND, 0o600)
    	if err == nil {
    		t.Fatal("Should fail here")
    	}
    }
    
    // Tests rwlock methods.
    func TestRWLockedFile(t *testing.T) {
    	f, err := os.CreateTemp("", "lock")
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  8. clause/joins_test.go

    package clause_test
    
    import (
    	"sync"
    	"testing"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/schema"
    	"gorm.io/gorm/utils/tests"
    )
    
    func TestJoin(t *testing.T) {
    	results := []struct {
    		name string
    		join clause.Join
    		sql  string
    	}{
    		{
    			name: "LEFT JOIN",
    			join: clause.Join{
    				Type:  clause.LeftJoin,
    				Table: clause.Table{Name: "user"},
    				ON: clause.Where{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Nov 03 13:03:13 GMT 2022
    - 2.6K bytes
    - Viewed (0)
  9. cmd/streaming-signature-v4_test.go

    		}
    	}
    }
    
    // Test read CRLF characters on input reader.
    func TestReadCRLF(t *testing.T) {
    	type testCase struct {
    		reader      io.Reader
    		expectedErr error
    	}
    	tests := []testCase{
    		// Test - 1 valid buffer with CRLF.
    		{bytes.NewReader([]byte("\r\n")), nil},
    		// Test - 2 invalid buffer with no CRLF.
    		{bytes.NewReader([]byte("he")), errMalformedEncoding},
    		// Test - 3 invalid buffer with more characters.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 5.7K bytes
    - Viewed (0)
  10. schema/model_test.go

    package schema_test
    
    import (
    	"database/sql"
    	"time"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/utils/tests"
    )
    
    type User struct {
    	*gorm.Model
    	Name      *string
    	Age       *uint
    	Birthday  *time.Time
    	Account   *tests.Account
    	Pets      []*tests.Pet
    	Toys      []*tests.Toy `gorm:"polymorphic:Owner"`
    	CompanyID *int
    	Company   *tests.Company
    	ManagerID *uint
    	Manager   *User
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.1K bytes
    - Viewed (0)
Back to top