(client)
| 103 | |
| 104 | @pytest.mark.asyncio |
| 105 | async def test_api_delete_plugine(client): |
| 106 | test_plugin = { |
| 107 | "name": "test_plugin", |
| 108 | "url": "http://test_plugin.com", |
| 109 | } |
| 110 | response = client.post("/api/plugins", json=test_plugin) |
| 111 | assert response.status_code == 201 |
| 112 | assert response.json() == test_plugin |
| 113 | response = client.delete("/api/plugins/test_plugin") |
| 114 | assert response.status_code == 200 |
| 115 | response = client.get("/api/plugins/test_plugin") |
| 116 | assert response.status_code == 404 |