Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,489 for Assert (0.2 sec)

  1. tests/test_tutorial/test_security/test_tutorial006.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"
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  2. tests/test_security_http_basic_realm.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 realm="simple"'
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  3. tests/test_security_http_basic_optional.py

        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/server_test.go

    		kubeClient: fakeClientSet,
    		netServer:  server,
    	}
    
    	err := m.AddPodToMesh(fakeCtx, pod, podIPs, "")
    	assert.NoError(t, err)
    
    	pod, err = fakeClientSet.CoreV1().Pods("test").Get(fakeCtx, "test", metav1.GetOptions{})
    	assert.NoError(t, err)
    	assert.Equal(t, len(pod.Annotations), 1)
    	assert.Equal(t, pod.Annotations[constants.AmbientRedirection], constants.AmbientRedirectionEnabled)
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  5. tensorflow/c/c_api_test.cc

      // Create a simple graph.
      Placeholder(graph, s);
      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
      ASSERT_TRUE(TF_GraphOperationByName(graph, "feed") != nullptr);
      TF_Operation* oper = ScalarConst(3, graph, s);
      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
      ASSERT_TRUE(TF_GraphOperationByName(graph, "scalar") != nullptr);
      Neg(oper, graph, s);
      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
  6. cmd/server_test.go

    	c.Assert(err, nil)
    	response, err = s.client.Do(request)
    	c.Assert(err, nil)
    	c.Assert(response.StatusCode, http.StatusOK)
    
    	deleteResp = DeleteObjectsResponse{}
    	delRespBytes, err = io.ReadAll(response.Body)
    	c.Assert(err, nil)
    	err = xml.Unmarshal(delRespBytes, &deleteResp)
    	c.Assert(err, nil)
    	c.Assert(len(deleteResp.DeletedObjects), len(delObjReq.Objects))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 108K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py

        assert response.status_code == 200, response.text
        item_data = response.json()
        assert item["title"] == item_data["title"]
        assert item["description"] == item_data["description"]
        assert "id" in item_data
        assert "owner_id" in item_data
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        user_data = response.json()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py

        assert response.status_code == 200, response.text
        item_data = response.json()
        assert item["title"] == item_data["title"]
        assert item["description"] == item_data["description"]
        assert "id" in item_data
        assert "owner_id" in item_data
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        user_data = response.json()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py

        assert response.status_code == 200, response.text
        item_data = response.json()
        assert item["title"] == item_data["title"]
        assert item["description"] == item_data["description"]
        assert "id" in item_data
        assert "owner_id" in item_data
        response = client.get("/users/1")
        assert response.status_code == 200, response.text
        user_data = response.json()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

        // Escapers operate on characters: no characters, no escaping.
        Assert.assertEquals("", escaper.escape(""));
        // Assert that escapers throw null pointer exceptions.
        try {
          escaper.escape((String) null);
          Assert.fail("exception not thrown when escaping a null string");
        } catch (NullPointerException e) {
          // pass
        }
      }
    
      /**
       * Asserts that an escaper escapes the given character into the expected string.
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.8K bytes
    - Viewed (0)
Back to top