georgs #23

Closed
Ghost wants to merge 50 commits from georgs into main
2 changed files with 26 additions and 0 deletions
Showing only changes of commit 03890360b8 - Show all commits

View File

@@ -0,0 +1,26 @@
import pytest
from api import TestClient
from fixtures_flakes import FlakeForTest
def test_producer(api: TestClient, test_flake: FlakeForTest) -> None:
request_body = """{
"uuid": "8e285c0c-4e40-430a-a477-26b3b81e30df",
"service_name": "Carlo's Printing",
"service_type": "3D Printing",
"endpoint_url": "http://127.0.0.1:8000",
"status": "unknown",
"other": {
"test": "test"
},
"entity_did": "did:sov:test:1234"
}"""
response = api.post(f"/api/v1/create_producer", json=request_body)
assert response.status_code == 200
assert response.json() == request_body
response = api.get(
f"api/v1/get_producer?entity_did=did%3Asov%3Atest%3A1234&skip=0&limit=100", json={}
)
assert response.status_code == 200
assert response.json() == request_body