Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 2,941 for get2 (0.04 sec)

  1. tests/test_starlette_exception.py

    client = TestClient(app)
    
    
    def test_get_item():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item": "The Foo Wrestlers"}
    
    
    def test_get_item_not_found():
        response = client.get("/items/bar")
        assert response.status_code == 404, response.text
        assert response.headers.get("x-error") == "Some custom header"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/ListSubListTester.java

        List<E> tail = list.subList(1, size);
        assertEquals(list.get(0), copy.get(0));
        assertEquals(list.get(size - 1), copy.get(size - 1));
        assertEquals(list.get(1), tail.get(0));
        assertEquals(list.get(size - 1), tail.get(size - 2));
        assertEquals(list.get(0), head.get(0));
        assertEquals(list.get(size - 2), head.get(size - 2));
        for (List<E> subList : asList(copy, head, tail)) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/testers/ListSubListTester.java

        List<E> tail = list.subList(1, size);
        assertEquals(list.get(0), copy.get(0));
        assertEquals(list.get(size - 1), copy.get(size - 1));
        assertEquals(list.get(1), tail.get(0));
        assertEquals(list.get(size - 1), tail.get(size - 2));
        assertEquals(list.get(0), head.get(0));
        assertEquals(list.get(size - 2), head.get(size - 2));
        for (List<E> subList : asList(copy, head, tail)) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. tests/test_infer_param_optionality.py

    app = FastAPI()
    
    
    user_router = APIRouter()
    item_router = APIRouter()
    
    
    @user_router.get("/")
    def get_users():
        return [{"user_id": "u1"}, {"user_id": "u2"}]
    
    
    @user_router.get("/{user_id}")
    def get_user(user_id: str):
        return {"user_id": user_id}
    
    
    @item_router.get("/")
    def get_items(user_id: Optional[str] = None):
        if user_id is None:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 13.3K bytes
    - Viewed (0)
  5. internal/config/api/api.go

    		apiReplicationFailedWorkers,
    		"expiry_workers",
    	}
    
    	disableODirect := env.Get(EnvAPIDisableODirect, kvs.Get(apiDisableODirect)) == config.EnableOn
    	enableODirect := env.Get(EnvAPIODirect, kvs.Get(apiODirect)) == config.EnableOn
    	gzipObjects := env.Get(EnvAPIGzipObjects, kvs.Get(apiGzipObjects)) == config.EnableOn
    	rootAccess := env.Get(EnvAPIRootAccess, kvs.Get(apiRootAccess)) == config.EnableOn
    
    	cfg = Config{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Aug 16 08:43:49 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  6. cmd/bucket-targets.go

    						Curr: hs.latency.curr,
    						Avg:  hs.latency.avg,
    						Max:  hs.latency.peak,
    					}
    				}
    				targets = append(targets, t.Clone())
    			}
    		}
    	}
    	return
    }
    
    // ListBucketTargets - gets list of bucket targets for this bucket.
    func (sys *BucketTargetSys) ListBucketTargets(ctx context.Context, bucket string) (*madmin.BucketTargets, error) {
    	sys.RLock()
    	defer sys.RUnlock()
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 21 22:22:24 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  7. tests/update_has_one_test.go

    			t.Fatalf("errors happened when create: %v", err)
    		}
    
    		var pet2 Pet
    		DB.Preload("Toy").Find(&pet2, "id = ?", pet.ID)
    		CheckPet(t, pet2, pet)
    
    		pet.Toy.Name += "new"
    		if err := DB.Save(&pet).Error; err != nil {
    			t.Fatalf("errors happened when update: %v", err)
    		}
    
    		var pet3 Pet
    		DB.Preload("Toy").Find(&pet3, "id = ?", pet.ID)
    		CheckPet(t, pet2, pet3)
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jul 14 06:55:54 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  8. tests/test_include_router_defaults_overrides.py

    
    callback_router0 = APIRouter()
    
    
    @callback_router0.get("/")
    async def callback0(level0: str):
        pass  # pragma: nocover
    
    
    callback_router1 = APIRouter()
    
    
    @callback_router1.get("/")
    async def callback1(level1: str):
        pass  # pragma: nocover
    
    
    callback_router2 = APIRouter()
    
    
    @callback_router2.get("/")
    async def callback2(level2: str):
        pass  # pragma: nocover
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 358.6K bytes
    - Viewed (0)
  9. cmd/test-utils_test.go

    			buf.WriteByte('\n')
    		}
    	}
    	canonicalHeaders := buf.String()
    
    	// Get signed headers.
    	signedHeaders := strings.Join(headers, ";")
    
    	// Get canonical query string.
    	req.URL.RawQuery = strings.ReplaceAll(req.URL.Query().Encode(), "+", "%20")
    
    	// Get canonical URI.
    	canonicalURI := s3utils.EncodePath(req.URL.Path)
    
    	// Get canonical request.
    	// canonicalRequest =
    	//  <HTTPMethod>\n
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 01 22:13:18 UTC 2024
    - 77K bytes
    - Viewed (0)
  10. tests/test_additional_responses_router.py

    
    app = FastAPI()
    router = APIRouter()
    
    
    @router.get("/a", responses={501: {"description": "Error 1"}})
    async def a():
        return "a"
    
    
    @router.get(
        "/b",
        responses={
            502: {"description": "Error 2"},
            "4XX": {"description": "Error with range, upper"},
        },
    )
    async def b():
        return "b"
    
    
    @router.get(
        "/c",
        responses={
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.1K bytes
    - Viewed (0)
Back to top