Search Options

Results per page
Sort
Preferred Languages
Advance

Results 541 - 550 of 1,047 for AssertJ (0.13 sec)

  1. guava-tests/test/com/google/common/hash/HashTestUtils.java

          HashCode hashcode2 = hashFunction.hashInt(value);
          Assert.assertEquals(hashcode1, hashcode2); // idempotent
          Assert.assertEquals(hashFunction.bits(), hashcode1.bits());
          Assert.assertEquals(hashFunction.bits(), hashcode1.asBytes().length * 8);
          hashcodes.add(hashcode1);
        }
        Assert.assertTrue(hashcodes.size() > objects * 0.95); // quite relaxed test
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_schema_extra_example/test_tutorial004_an_py39.py

                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    @needs_py39
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_schema_extra_example/test_tutorial004_py310.py

                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    @needs_py310
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_settings/test_tutorial001_pv1.py

        monkeypatch.setenv("ADMIN_EMAIL", "******@****.***")
        from docs_src.settings.tutorial001_pv1 import app
    
        client = TestClient(app)
        response = client.get("/info")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "app_name": "Awesome API",
            "admin_email": "******@****.***",
            "items_per_user": 50,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 556 bytes
    - Viewed (0)
  5. tests/test_datetime_custom_encoder.py

        @app.get("/model", response_model=ModelWithDatetimeField)
        def get_model():
            return model
    
        client = TestClient(app)
        with client:
            response = client.get("/model")
        assert response.json() == {"dt_field": "2019-01-01T08:00:00+00:00"}
    
    
    # TODO: remove when deprecating Pydantic v1
    @needs_pydanticv1
    def test_pydanticv1():
        class ModelWithDatetimeField(BaseModel):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/HeadersRequestTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.TestUtil.headerEntries
    import okhttp3.internal.http2.Http2ExchangeCodec.Companion.http2HeadersList
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  7. docs_src/app_testing/tutorial003.py

    @app.get("/items/{item_id}")
    async def read_items(item_id: str):
        return items[item_id]
    
    
    def test_read_items():
        with TestClient(app) as client:
            response = client.get("/items/foo")
            assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 528 bytes
    - Viewed (0)
  8. tests/test_router_prefix_with_template.py

    
    app.include_router(router, prefix="/{segment}")
    
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/seg/users/foo")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Apr 08 04:37:38 UTC 2020
    - 484 bytes
    - Viewed (0)
  9. docs_src/app_testing/tutorial001.py

    app = FastAPI()
    
    
    @app.get("/")
    async def read_main():
        return {"msg": "Hello World"}
    
    
    client = TestClient(app)
    
    
    def test_read_main():
        response = client.get("/")
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 334 bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/DuplexTest.kt

     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.contains
    import assertk.assertions.containsExactly
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNull
    import assertk.assertions.isTrue
    import java.io.IOException
    import java.net.HttpURLConnection
    import java.net.ProtocolException
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 23.9K bytes
    - Viewed (0)
Back to top