66👍
✅
Thanks to the #django channel on Freenode IRC, I found the following method is the correct one to pass parameters all the way through to the view:
response = DeviceView.as_view()(request, pk=1)
I hope this helps somebody else attempting to use RequestFactory to test DetailView or DeleteView etc
Source:stackexchange.com