Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /lexy-ai_lexy /lexy_tests /test_fixtures.py
| import pytest | |
| class TestFixtures: | |
| """Test the fixtures in `lexy_tests/conftest.py`.""" | |
| def test_hello(self): | |
| assert True | |
| def test_get_root_with_client(self, client): | |
| response = client.get("/api") | |
| assert response.status_code == 200 | |
| assert response.json() == {"Say": "Hello!"} | |
| async def test_get_root_with_client(self, client): # noqa: F811 | |
| response = client.get("/api") | |
| assert response.status_code == 200 | |
| assert response.json() == {"Say": "Hello!"} | |
| async def test_get_root_with_async_client(self, async_client): | |
| response = await async_client.get( | |
| # Trailing slash is required on the root path only. | |
| # See https://stackoverflow.com/a/70354027 | |
| "/api/", | |
| ) | |
| assert response.status_code == 200 | |
| assert response.json() == {"Say": "Hello!"} | |
| def test_get_ping_with_client(self, client): | |
| response = client.get( | |
| "/api/ping", | |
| ) | |
| assert response.status_code == 200, response.text | |
| data = response.json() | |
| assert data == {"ping": "pong!"} | |
| async def test_get_ping_with_client(self, client): # noqa: F811 | |
| response = client.get( | |
| "/api/ping", | |
| ) | |
| assert response.status_code == 200, response.text | |
| data = response.json() | |
| assert data == {"ping": "pong!"} | |
| async def test_get_ping_with_async_client(self, async_client): | |
| response = await async_client.get( | |
| "/api/ping", | |
| ) | |
| assert response.status_code == 200, response.text | |
| data = response.json() | |
| assert data == {"ping": "pong!"} | |
| def test_get_db_endpoint_with_client(self, client): | |
| response = client.get( | |
| "/api/collections", | |
| ) | |
| assert response.status_code == 200, response.text | |
| data = response.json() | |
| assert len(data) > 1 | |
| async def test_get_db_endpoint_with_client(self, client): # noqa: F811 | |
| response = client.get( | |
| "/api/collections", | |
| ) | |
| assert response.status_code == 200, response.text | |
| data = response.json() | |
| assert len(data) > 1 | |
| async def test_get_db_endpoint_with_async_client(self, async_client): | |
| response = await async_client.get( | |
| "/api/collections", | |
| ) | |
| assert response.status_code == 200, response.text | |
| data = response.json() | |
| assert len(data) > 1 | |
Xet Storage Details
- Size:
- 2.61 kB
- Xet hash:
- 6ac3cd84b3935fb01f4f8a08e14f145139035b7565887bff0408cb7014aa688f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.