- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for test_get_exception (0.06 sec)
-
tests/test_tutorial/test_handling_errors/test_tutorial003.py
client = TestClient(app) def test_get(): response = client.get("/unicorns/shinny") assert response.status_code == 200, response.text assert response.json() == {"unicorn_name": "shinny"} def test_get_exception(): response = client.get("/unicorns/yolo") assert response.status_code == 418, response.text assert response.json() == { "message": "Oops! yolo did something. There goes a rainbow..." }
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.2K bytes - Viewed (0) -
src/test/java/jcifs/util/transport/ResponseTest.java
// Call the method mockResponse.reset(); // Verify that the method was called verify(mockResponse, times(1)).reset(); } @Test void testGetException() { Exception testException = new RuntimeException("Test Exception"); when(mockResponse.getException()).thenReturn(testException); assertEquals(testException, mockResponse.getException());Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/CommonServerMessageBlockResponseTest.java
// Then verify(response).setExpiration(expiration); } @Test @DisplayName("Test Response interface methods - getException") void testGetException() { // Given Exception expectedException = new Exception("Test exception"); when(response.getException()).thenReturn(expectedException); // WhenRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.3K bytes - Viewed (0)