Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,107 for asset1 (0.08 sec)

  1. guava-tests/test/com/google/common/base/OptionalTest.java

        Set<String> expected = Collections.singleton("a");
        assertEquals(expected, Optional.of("a").asSet());
      }
    
      public void testAsSet_absent() {
        assertTrue("Returned set should be empty", Optional.absent().asSet().isEmpty());
      }
    
      public void testAsSet_presentIsImmutable() {
        Set<String> presentAsSet = Optional.of("a").asSet();
        assertThrows(UnsupportedOperationException.class, () -> presentAsSet.add("b"));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial012_an_py39.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    @needs_py39
    def test_get_invalid_one_users(client: TestClient):
        response = client.get("/users/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py

        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert "https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js" in response.text
        assert "https://unpkg.com/swagger-ui-dist@5/swagger-ui.css" in response.text
    
    
    def test_swagger_ui_oauth2_redirect_html(client: TestClient):
        response = client.get("/docs/oauth2-redirect")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu May 23 22:59:02 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_form_models/test_tutorial002_pv1_an.py

        assert response.status_code == 200
        assert response.json() == {"username": "Foo", "password": "secret"}
    
    
    # TODO: remove when deprecating Pydantic v1
    @needs_pydanticv1
    def test_post_body_extra_form(client: TestClient):
        response = client.post(
            "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"}
        )
        assert response.status_code == 422
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  5. tests/test_dependency_normal_exceptions.py

    
    def test_dependency_gets_exception():
        assert state["except"] is False
        assert state["finally"] is False
        response = client.put("/invalid-user/rick", json="Morty")
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Invalid user"}
        assert state["except"] is True
        assert state["finally"] is True
        assert fake_database["rick"] == "Rick Sanchez"
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_sql_databases/test_tutorial002.py

            response = client.post(
                "/heroes/", json={"name": "Rusty-Man", "secret_name": "Tommy Sharp"}
            )
            assert response.status_code == 200, response.text
    
            response = client.get("/heroes/")
            assert response.status_code == 200, response.text
            assert response.json() == snapshot(
                [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/hash/BloomFilterTest.java

    package com.google.common.hash;
    
    import static com.google.common.truth.Truth.assertThat;
    import static java.nio.charset.StandardCharsets.UTF_8;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.base.Stopwatch;
    import com.google.common.collect.ImmutableSet;
    import com.google.common.hash.BloomFilterStrategies.LockFreeBitArray;
    import com.google.common.math.LongMath;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_configure_swagger_ui/test_tutorial001.py

    
    def test_swagger_ui():
        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert (
            '"syntaxHighlight": false' in response.text
        ), "syntaxHighlight should be included and converted to JSON"
        assert (
            '"dom_id": "#swagger-ui"' in response.text
        ), "default configs should be preserved"
        assert "presets: [" in response.text, "default configs should be preserved"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 19 19:54:04 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial006_an.py

        assert response.status_code == 200, response.text
        assert response.json() == {"username": "john", "password": "secret"}
    
    
    def test_security_http_basic_no_credentials():
        response = client.get("/users/me")
        assert response.json() == {"detail": "Not authenticated"}
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_security/test_tutorial003.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    def test_no_token():
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8K bytes
    - Viewed (0)
Back to top