apexdevkit 1.5.4__tar.gz → 1.5.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/PKG-INFO +1 -1
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/testing/rest.py +6 -20
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/pyproject.toml +1 -1
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/LICENSE +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/README.md +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/error.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/fastapi/router.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/fastapi/schema.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/fastapi/service.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/formatter.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/http/fake.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/http/fluent.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/http/httpx.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/repository/base.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/repository/connector.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/repository/database.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/repository/in_memory.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/repository/interface.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.5.4 → apexdevkit-1.5.5}/apexdevkit/testing/fake.py +0 -0
|
@@ -4,8 +4,6 @@ from abc import abstractmethod
|
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
from functools import cached_property
|
|
6
6
|
from typing import Any, Iterable, Self
|
|
7
|
-
from uuid import UUID
|
|
8
|
-
from warnings import warn
|
|
9
7
|
|
|
10
8
|
import httpx
|
|
11
9
|
from fastapi.testclient import TestClient
|
|
@@ -126,13 +124,13 @@ class CreateOne(RestRequest):
|
|
|
126
124
|
|
|
127
125
|
@dataclass
|
|
128
126
|
class ReadOne(RestRequest):
|
|
129
|
-
item_id: str
|
|
127
|
+
item_id: str = field(init=False)
|
|
130
128
|
|
|
131
129
|
@cached_property
|
|
132
130
|
def response(self) -> httpx.Response:
|
|
133
131
|
return self.http.get(self.resource + str(self.item_id))
|
|
134
132
|
|
|
135
|
-
def with_id(self, value:
|
|
133
|
+
def with_id(self, value: Any) -> Self:
|
|
136
134
|
self.item_id = str(value)
|
|
137
135
|
|
|
138
136
|
return self
|
|
@@ -154,14 +152,14 @@ class ReadAll(RestRequest):
|
|
|
154
152
|
|
|
155
153
|
@dataclass
|
|
156
154
|
class UpdateOne(RestRequest):
|
|
157
|
-
item_id: str
|
|
155
|
+
item_id: str = field(init=False)
|
|
158
156
|
data: JsonDict = field(init=False)
|
|
159
157
|
|
|
160
158
|
@cached_property
|
|
161
159
|
def response(self) -> httpx.Response:
|
|
162
160
|
return self.http.patch(self.resource + str(self.item_id), json=dict(self.data))
|
|
163
161
|
|
|
164
|
-
def with_id(self, value:
|
|
162
|
+
def with_id(self, value: Any) -> Self:
|
|
165
163
|
self.item_id = str(value)
|
|
166
164
|
|
|
167
165
|
return self
|
|
@@ -214,13 +212,13 @@ class UpdateMany(RestRequest):
|
|
|
214
212
|
|
|
215
213
|
@dataclass
|
|
216
214
|
class DeleteOne(RestRequest):
|
|
217
|
-
item_id: str
|
|
215
|
+
item_id: str = field(init=False)
|
|
218
216
|
|
|
219
217
|
@cached_property
|
|
220
218
|
def response(self) -> httpx.Response:
|
|
221
219
|
return self.http.delete(self.resource + str(self.item_id))
|
|
222
220
|
|
|
223
|
-
def with_id(self, value:
|
|
221
|
+
def with_id(self, value: Any) -> Self:
|
|
224
222
|
self.item_id = str(value)
|
|
225
223
|
|
|
226
224
|
return self
|
|
@@ -265,18 +263,6 @@ class RestResponse:
|
|
|
265
263
|
|
|
266
264
|
return self
|
|
267
265
|
|
|
268
|
-
def and_data(self, *values: JsonDict) -> Self: # pragma: no cover
|
|
269
|
-
warn(
|
|
270
|
-
(
|
|
271
|
-
"The 'and_data' method is deprecated. "
|
|
272
|
-
"Please use 'and_item' or 'and_collection' instead."
|
|
273
|
-
)
|
|
274
|
-
)
|
|
275
|
-
if len(values) == 1:
|
|
276
|
-
return self.with_item(values[0])
|
|
277
|
-
|
|
278
|
-
return self.with_collection(list(values))
|
|
279
|
-
|
|
280
266
|
def and_item(self, value: Any) -> Self:
|
|
281
267
|
return self.with_item(value)
|
|
282
268
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|