Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 1,098 for foo (0.01 sec)

  1. tests/test_tutorial/test_body/test_tutorial001_py310.py

            "tax": None,
        }
    
    
    @needs_py310
    def test_post_with_str_float_description_tax(client: TestClient):
        response = client.post(
            "/items/",
            json={"name": "Foo", "price": "50.5", "description": "Some Foo", "tax": 0.3},
        )
        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 50.5,
            "description": "Some Foo",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 15K bytes
    - Viewed (1)
  2. guava-tests/test/com/google/common/collect/AbstractTableReadTest.java

      }
    
      public void testContains() {
        table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
        assertTrue(table.contains("foo", 1));
        assertTrue(table.contains("bar", 1));
        assertTrue(table.contains("foo", 3));
        assertFalse(table.contains("foo", 2));
        assertFalse(table.contains("bar", 3));
        assertFalse(table.contains("cat", 1));
        assertFalse(table.contains("foo", null));
        assertFalse(table.contains(null, 1));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  3. tests/test_jsonable_encoder.py

        assert jsonable_encoder(model, exclude_defaults=True) == {"foo": "foo"}
        assert jsonable_encoder(model, exclude_unset=True, exclude_defaults=True) == {
            "foo": "foo"
        }
        assert jsonable_encoder(model, include={"foo"}) == {"foo": "foo"}
        assert jsonable_encoder(model, exclude={"bla"}) == {"foo": "foo", "bar": "bar"}
        assert jsonable_encoder(model, include={}) == {}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 9K bytes
    - Viewed (0)
  4. src/test/java/jcifs/tests/FileLocationTest.java

                  SmbResource c = new SmbFile(p, "foo/") ) {
                SmbResourceLocator fl = c.getLocator();
                assertEquals("1.2.3.4", fl.getServer());
                assertEquals(SmbConstants.TYPE_FILESYSTEM, fl.getType());
                assertEquals("share", fl.getShare());
                assertEquals("\\foo\\", fl.getUNCPath());
                assertEquals("smb://1.2.3.4/share/foo/", fl.getCanonicalURL());
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Wed Jan 08 13:16:07 UTC 2020
    - 23K bytes
    - Viewed (0)
  5. tests/test_additional_properties_bool.py

        else:
    
            class Config:
                extra = "forbid"
    
    
    class Foo(FooBaseModel):
        pass
    
    
    app = FastAPI()
    
    
    @app.post("/")
    async def post(
        foo: Union[Foo, None] = None,
    ):
        return foo
    
    
    client = TestClient(app)
    
    
    def test_call_invalid():
        response = client.post("/", json={"foo": {"bar": "baz"}})
        assert response.status_code == 422
    
    
    def test_call_valid():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  6. docs_src/app_testing/app_b/test_main.py

    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():
        response = client.get("/items/foo", headers={"X-Token": "hailhydra"})
        assert response.status_code == 400
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. docs_src/app_testing/app_b_an_py39/test_main.py

    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():
        response = client.get("/items/foo", headers={"X-Token": "hailhydra"})
        assert response.status_code == 400
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Aug 15 22:31:16 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/ComparisonChainTest.java

                .thenComparing(foo -> foo.anEnum, nullsLast(naturalOrder()));
        ImmutableList<Foo> instances =
            ImmutableList.of(
                new Foo("a", 1, TriState.TRUE),
                new Foo("a", 2, TriState.TRUE),
                new Foo("b", 1, TriState.FALSE),
                new Foo("b", 1, TriState.TRUE),
                new Foo("b", 1, null));
        for (Foo a : instances) {
          for (Foo b : instances) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 13:27:08 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/AbstractTableTest.java

          assertEquals((Character) 'c', table.get("foo", 3));
        }
      }
    
      public void testRowClearAndPut() {
        if (supportsRemove()) {
          table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
          Map<Integer, C> row = table.row("foo");
          assertEquals(ImmutableMap.of(1, 'a', 3, 'c'), row);
          table.remove("foo", 3);
          assertEquals(ImmutableMap.of(1, 'a'), row);
          table.remove("foo", 1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java

      private static final ImmutableSet<String> NON_PS =
          ImmutableSet.of(
              "foo.bar.com",
              "foo.ca",
              "foo.bar.ca",
              "foo.blogspot.com",
              "foo.blogspot.co.uk",
              "foo.uk.com",
              "foo.bar.co.il",
              "state.CA.us",
              "www.state.pa.us",
              "pvt.k12.ca.us",
              "www.google.com",
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top