(client)
| 44 | |
| 45 | @pytest.mark.asyncio |
| 46 | async def test_api_get_plugins(client): |
| 47 | test_plugin = { |
| 48 | "name": "test_plugin", |
| 49 | "url": "http://test_plugin.com", |
| 50 | } |
| 51 | response = client.post("/api/plugins", json=test_plugin) |
| 52 | assert response.status_code == 201 |
| 53 | assert response.json() == test_plugin |
| 54 | response = client.get("/api/plugins") |
| 55 | assert response.status_code == 200 |
| 56 | assert response.json() == [test_plugin] |
| 57 | |
| 58 | |
| 59 | @pytest.mark.asyncio |