- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for test_invalid (0.21 sec)
-
tests/test_validate_response_dataclass.py
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_double_invalid(): with pytest.raises(ResponseValidationError): client.get("/items/innerinvalid")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_validate_response.py
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(): with pytest.raises(ResponseValidationError): client.get("/items/invalidnone")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java
public void testValid() { for (String name : VALID_NAME) { InternetDomainName unused = InternetDomainName.from(name); } } public void testInvalid() { for (String name : INVALID_NAME) { assertThrows(IllegalArgumentException.class, () -> InternetDomainName.from(name)); } } public void testPublicSuffix() { for (String name : PS) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 17.1K bytes - Viewed (0) -
compat/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/ModelVersionParserTest.java
} private void assertContains(VersionConstraint c, String... versions) { assertContains(String.format("%s: %%s should be contained\n", c.toString()), c, true, versions); } @Test void testInvalid() { parseInvalid("[1,"); parseInvalid("[1,2],(3,"); parseInvalid("[1,2],3"); } @Test void testSameUpperAndLowerBound() throws VersionParserException {
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 4K bytes - Viewed (0) -
tests/test_serialize_response_dataclass.py
Item(name="bar", date=datetime(2021, 7, 26), price=1.0), Item(name="baz", date=datetime(2021, 7, 26), price=2.0, owner_ids=[1, 2, 3]), ] client = TestClient(app) def test_valid(): response = client.get("/items/valid") response.raise_for_status() assert response.json() == { "name": "valid", "date": datetime(2021, 7, 26).isoformat(), "price": 1.0,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 26 13:56:47 UTC 2022 - 4.9K bytes - Viewed (0) -
tests/test_serialize_response_model.py
"k1": Item(aliased_name="foo"), "k2": Item(aliased_name="bar", price=1.0), "k3": Item(aliased_name="baz", price=2.0, owner_ids=[1, 2, 3]), } client = TestClient(app) def test_valid(): response = client.get("/items/valid") response.raise_for_status() assert response.json() == {"aliased_name": "valid", "price": 1.0, "owner_ids": None} def test_coerce():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 4.2K bytes - Viewed (0)