(self)
| 255 | to the viewset. |
| 256 | """ |
| 257 | def setUp(self): |
| 258 | class NoteViewSet(viewsets.ModelViewSet): |
| 259 | queryset = RouterTestModel.objects.all() |
| 260 | lookup_field = 'uuid' |
| 261 | lookup_value_regex = '[0-9a-f]{32}' |
| 262 | |
| 263 | self.router = SimpleRouter() |
| 264 | self.router.register(r'notes', NoteViewSet) |
| 265 | self.urls = self.router.urls |
| 266 | |
| 267 | def test_urls_limited_by_lookup_value_regex(self): |
| 268 | expected = ['^notes/$', '^notes/(?P<uuid>[0-9a-f]{32})/$'] |
nothing calls this directly
no test coverage detected