MCPcopy Create free account
hub / github.com/encode/django-rest-framework / setUp

Method setUp

tests/test_routers.py:302–308  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

300
301class TestTrailingSlashIncluded(TestCase):
302 def setUp(self):
303 class NoteViewSet(viewsets.ModelViewSet):
304 queryset = RouterTestModel.objects.all()
305
306 self.router = SimpleRouter()
307 self.router.register(r'notes', NoteViewSet)
308 self.urls = self.router.urls
309
310 def test_urls_have_trailing_slash_by_default(self):
311 expected = ['^notes/$', '^notes/(?P<pk>[^/.]+)/$']

Callers

nothing calls this directly

Calls 2

SimpleRouterClass · 0.90
registerMethod · 0.80

Tested by

no test coverage detected