We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c97efe6 commit 54b16b4Copy full SHA for 54b16b4
tests/test_generators.py
@@ -0,0 +1,16 @@
1
+"""Test the generators module"""
2
+
3
+import uuid
4
5
+from fastapi.testclient import TestClient
6
7
+from api.server import app
8
9
+client = TestClient(app)
10
11
12
+def test_read_random_numbers():
13
+ response = client.post("/generators/uuids/", json={"uuid_type": 1, "quantity": 1})
14
+ assert response.status_code == 200
15
+ first = response.json()["uuids"][0]
16
+ assert isinstance(uuid.UUID(first), uuid.UUID)
0 commit comments