Search Options

Results per page
Sort
Preferred Languages
Advance

Results 251 - 260 of 3,434 for getT (0.08 sec)

  1. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py39
    def test_token(client: TestClient):
        access_token = get_access_token(scope="me", client=client)
        response = client.get(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial008c.py

        return client
    
    
    def test_get_no_item(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
    
    
    def test_get(client: TestClient):
        response = client.get("/items/plumbus")
        assert response.status_code == 200, response.text
        assert response.json() == "plumbus"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  3. compat/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java

    /**
     */
    class DefaultModelBuilderFactoryTest {
    
        private static final String BASE_DIR =
                Paths.get("src", "test", "resources", "poms", "factory").toString();
    
        private File getPom(String name) {
            return new File(Paths.get(BASE_DIR, name + ".xml").toString()).getAbsoluteFile();
        }
    
        @Test
        void testCompleteWiring() throws Exception {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/AbstractTableTest.java

        other.put("cat", 2, cellValue('f'));
        table.putAll(other);
        assertEquals((Character) 'd', table.get("foo", 1));
        assertEquals((Character) 'b', table.get("bar", 1));
        assertEquals((Character) 'c', table.get("foo", 3));
        assertEquals((Character) 'e', table.get("bar", 2));
        assertEquals((Character) 'f', table.get("cat", 2));
        assertSize(5);
      }
    
      public void testRemove() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/collection/CaseInsensitiveMapTest.java

        public void testGet() throws Exception {
            assertThat(map.get("ONE"), is("1"));
            assertThat(map.get("One"), is("1"));
            assertThat(map.get("hoge"), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testPut() throws Exception {
            assertThat(map.put("One", "11"), is("1"));
            assertThat(map.get("one"), is("11"));
        }
    
        /**
         * @throws Exception
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_security/test_tutorial001.py

    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_token():
        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java

        return result;
      }
    
      /**
       * Returns the value associated with {@code key}, or zero if there is no value associated with
       * {@code key}.
       */
      public long get(K key) {
        AtomicLong atomic = map.get(key);
        return atomic == null ? 0L : atomic.get();
      }
    
      /**
       * Increments by one the value currently associated with {@code key}, and returns the new value.
       */
      @CanIgnoreReturnValue
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http/RequestLine.kt

       * http://android.com/foo HTTP/1.1") or only the path (like "GET /foo HTTP/1.1").
       */
      private fun includeAuthorityInRequestLine(
        request: Request,
        proxyType: Proxy.Type,
      ): Boolean {
        return !request.isHttps && proxyType == Proxy.Type.HTTP
      }
    
      /**
       * Returns the path to request, like the '/' in 'GET / HTTP/1.1'. Never empty, even if the request
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dependencies/test_tutorial012.py

                ]
            }
        )
    
    
    def test_get_invalid_one_header_items():
        response = client.get("/items/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    def test_get_invalid_one_users():
        response = client.get("/users/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  10. tests/test_generic_parameterless_depends.py

    
    class A:
        pass
    
    
    class B:
        pass
    
    
    @app.get("/a")
    async def a(dep: Dep[A]):
        return {"cls": dep.__class__.__name__}
    
    
    @app.get("/b")
    async def b(dep: Dep[B]):
        return {"cls": dep.__class__.__name__}
    
    
    client = TestClient(app)
    
    
    def test_generic_parameterless_depends():
        response = client.get("/a")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Apr 02 02:52:56 UTC 2024
    - 1.8K bytes
    - Viewed (0)
Back to top