Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 193 for baz (0.14 sec)

  1. docs_src/body_updates/tutorial001.py

        tax: float = 10.5
        tags: List[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_item(item_id: str):
        return items[item_id]
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 906 bytes
    - Viewed (0)
  2. tests/test_validate_response.py

    
    @app.get("/items/invalidlist", response_model=List[Item])
    def get_invalidlist():
        return [
            {"name": "foo"},
            {"name": "bar", "price": "bar"},
            {"name": "baz", "price": "baz"},
        ]
    
    
    client = TestClient(app)
    
    
    def test_invalid():
        with pytest.raises(ResponseValidationError):
            client.get("/items/invalid")
    
    
    def test_invalid_none():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_dependencies/test_tutorial004.py

                        {"item_name": "Bar"},
                        {"item_name": "Baz"},
                    ]
                },
            ),
            (
                "/items?q=foo",
                200,
                {
                    "items": [
                        {"item_name": "Foo"},
                        {"item_name": "Bar"},
                        {"item_name": "Baz"},
                    ],
                    "q": "foo",
                },
            ),
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  4. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirSmartcastProvider.kt

                if (parent is KtParenthesizedExpression) return false
    
                // expressions like `|foo.bar()|` or `|foo?.baz()|` are ignored
                if (this is KtQualifiedExpression && selectorExpression is KtCallExpression) return false
    
                // expressions like `foo.|bar|` or `foo?.|baz|` are ignored
                if (this is KtNameReferenceExpression && getQualifiedExpressionForSelector() != null) return false
    
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Thu Sep 14 10:03:02 GMT 2023
    - 6K bytes
    - Viewed (0)
  5. docs_src/body_updates/tutorial002.py

        tax: float = 10.5
        tags: List[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_item(item_id: str):
        return items[item_id]
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/ListsTest.java

          }
        }.test();
      }
    
      private void checkFooBarBazList(List<String> list) {
        assertThat(list).containsExactly("foo", "bar", "baz").inOrder();
        assertEquals(3, list.size());
        assertIndexIsOutOfBounds(list, -1);
        assertEquals("foo", list.get(0));
        assertEquals("bar", list.get(1));
        assertEquals("baz", list.get(2));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 35.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ForwardingMapTest.java

        Map<String, String> hashmap = Maps.newHashMap();
        hashmap.put("foo", "bar");
        hashmap.put(null, "baz");
    
        StandardImplForwardingMap<String, String> forwardingMap =
            new StandardImplForwardingMap<>(Maps.<String, String>newHashMap());
        forwardingMap.put("foo", "bar");
        forwardingMap.put(null, "baz");
    
        assertEquals(hashmap.toString(), forwardingMap.toString());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/ForwardingMapTest.java

        Map<String, String> hashmap = Maps.newHashMap();
        hashmap.put("foo", "bar");
        hashmap.put(null, "baz");
    
        StandardImplForwardingMap<String, String> forwardingMap =
            new StandardImplForwardingMap<>(Maps.<String, String>newHashMap());
        forwardingMap.put("foo", "bar");
        forwardingMap.put(null, "baz");
    
        assertEquals(hashmap.toString(), forwardingMap.toString());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  9. istioctl/pkg/writer/table/writer_test.go

    				NewCell(o.version),
    			},
    		}
    	})
    	w.AddRow(newTestObject("foo", "bar", "1.0"))
    	w.AddRow(newTestObject("baz", "qux", "2.0"))
    	w.AddRow(newTestObject("qux", "quux", "3"))
    	w.Flush()
    	expected := "NAME  NAMESPACE      VERSION\n" +
    		"foo   \x1b[32mbar\x1b[0m            1.0\n" +
    		"baz   \x1b[32mqux\x1b[0m            2.0\n" +
    		"qux   \x1b[32mquux\x1b[0m           3\n"
    	if got.String() != expected {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Oct 08 04:41:42 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py

        assert response.json() == {"q": ["foo", "bar"]}
    
    
    def test_multi_query_values():
        url = "/items/?q=baz&q=foobar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["baz", "foobar"]}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.4K bytes
    - Viewed (0)
Back to top