- Sort Score
- Result 10 results
- Languages All
Results 181 - 190 of 1,098 for assertIs (0.15 sec)
-
tests/test_tutorial/test_bigger_applications/test_main.py
def test_users_token_jessica(client: TestClient): response = client.get("/users?token=jessica") assert response.status_code == 200 assert response.json() == [{"username": "Rick"}, {"username": "Morty"}] def test_users_with_no_token(client: TestClient): response = client.get("/users") assert response.status_code == 422 assert response.json() == IsDict( { "detail": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 24.6K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py
response = client.post("/uploadfile/", files={"file": file}) assert response.status_code == 200, response.text assert response.json() == {"filename": "test.txt"} @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",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.7K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial001_an_py39.py
assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} @needs_py39 def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422 assert response.json() == IsDict( { "detail": [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 05 15:16:50 UTC 2024 - 7.5K bytes - Viewed (0) -
tests/test_security_http_bearer_optional.py
response = client.get("/users/me", headers={"Authorization": "Bearer foobar"}) assert response.status_code == 200, response.text assert response.json() == {"scheme": "Bearer", "credentials": "foobar"} def test_security_http_bearer_no_credentials(): response = client.get("/users/me") assert response.status_code == 200, response.text assert response.json() == {"msg": "Create an account first"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_description.py
def test_no_token(): response = client.get("/items") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} def test_incorrect_token(): response = client.get("/items", headers={"Authorization": "Non-existent testtoken"}) assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} def test_token():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional.py
def test_no_token(): response = client.get("/items") assert response.status_code == 200, response.text assert response.json() == {"msg": "Create an account first"} def test_token(): response = client.get("/items", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"token": "testtoken"} def test_incorrect_token():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_tutorial/test_testing_dependencies/test_tutorial001_py310.py
assert response.status_code == 200, response.text assert response.json() == { "message": "Hello Users!", "params": {"q": "foo", "skip": 5, "limit": 10}, } @needs_py310 def test_normal_app(): from docs_src.dependency_testing.tutorial001_py310 import app, client app.dependency_overrides = None response = client.get("/items/?q=foo&skip=100&limit=200")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheControlJvmTest.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 assertk.assertions.isFalse import assertk.assertions.isSameAs import assertk.assertions.isTrue import java.util.concurrent.TimeUnit import kotlin.test.assertFailsWith import okhttp3.CacheControl.Companion.parse
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt
import android.os.Build import androidx.test.platform.app.InstrumentationRegistry import assertk.assertThat import assertk.assertions.hasMessage import assertk.assertions.isEmpty import assertk.assertions.isEqualTo import assertk.assertions.isNotEmpty import assertk.assertions.isNull import assertk.fail import java.net.InetAddress import java.net.UnknownHostException import java.util.concurrent.CountDownLatch
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py39.py
response = client.post("/items/", json={"name": "Foo"}) assert response.status_code == 200, response.text assert response.json() == {"name": "Foo", "description": None} @needs_py39 def test_read_items(client: TestClient) -> None: response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [ { "name": "Portal Gun",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 4.9K bytes - Viewed (0)