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 178a2dc commit 30a21a9Copy full SHA for 30a21a9
tests/schemas/test_openapi.py
@@ -242,6 +242,19 @@ def test_prefixed_paths_construction(self):
242
assert '/v1/example/' in paths
243
assert '/v1/example/{id}/' in paths
244
245
+ def test_mount_url_prefixed_to_paths(self):
246
+ patterns = [
247
+ url(r'^example/?$', views.ExampleListView.as_view()),
248
+ url(r'^example/{pk}/?$', views.ExampleDetailView.as_view()),
249
+ ]
250
+ generator = SchemaGenerator(patterns=patterns, url='/api/')
251
+ generator._initialise_endpoints()
252
+
253
+ paths = generator.get_paths()
254
255
+ assert '/api/example/' in paths
256
+ assert '/api/example/{id}/' in paths
257
258
def test_schema_construction(self):
259
"""Construction of the top level dictionary."""
260
patterns = [
0 commit comments