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

Method setUp

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

Source from the content-addressed store, hash-verified

315
316class TestTrailingSlashRemoved(TestCase):
317 def setUp(self):
318 class NoteViewSet(viewsets.ModelViewSet):
319 queryset = RouterTestModel.objects.all()
320
321 self.router = SimpleRouter(trailing_slash=False)
322 self.router.register(r'notes', NoteViewSet)
323 self.urls = self.router.urls
324
325 def test_urls_can_have_trailing_slash_removed(self):
326 expected = ['^notes$', '^notes/(?P<pk>[^/.]+)$']

Callers

nothing calls this directly

Calls 2

SimpleRouterClass · 0.90
registerMethod · 0.80

Tested by

no test coverage detected