title: Django CBV AttributeError: Generic detail view must be called with either an object pk or a slug
body: <p>I'm trying to get the output of a class based view in a test.</p>
  
  <pre><code>factory = RequestFactory()
  request = factory.get(item.get_absolute_url()) # get_absolute_url returns '/my-slug-path/'
  request.user = UserFactory(username='test', is_staff=False, is_superuser=False)
  item_view = ItemDetail.as_view()
  response = item_view(request)
  </code></pre>
  
  <p>When I run the above code, it errors out on <code>item_view(request)</code>.</p>
  
  <pre><code>*** AttributeError: Generic detail view ItemDetail must be called with either an object pk or a slug.
  </code></pre>
  
  <p>How can I make this work?  The CBV works fine in normal site operation, but while writing the test it fails at this point.  Any help would be greatly appreciated</p>