diff --git a/tests/schemas/test_openapi.py b/tests/schemas/test_openapi.py index a928b6b30..674ee9829 100644 --- a/tests/schemas/test_openapi.py +++ b/tests/schemas/test_openapi.py @@ -229,18 +229,18 @@ class TestGenerator(TestCase): assert 'post' in example_operations def test_prefixed_paths_construction(self): - """Construction of the `paths` key with a common prefix.""" + """Construction of the `paths` key maintains a common prefix.""" patterns = [ - url(r'^api/v1/example/?$', views.ExampleListView.as_view()), - url(r'^api/v1/example/{pk}/?$', views.ExampleDetailView.as_view()), + url(r'^v1/example/?$', views.ExampleListView.as_view()), + url(r'^v1/example/{pk}/?$', views.ExampleDetailView.as_view()), ] generator = SchemaGenerator(patterns=patterns) generator._initialise_endpoints() paths = generator.get_paths() - assert '/example/' in paths - assert '/example/{id}/' in paths + assert '/v1/example/' in paths + assert '/v1/example/{id}/' in paths def test_schema_construction(self): """Construction of the top level dictionary."""