Skip to content

Commit

Permalink
Fixing doc references.
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamu committed Jun 22, 2015
1 parent 39d6684 commit 7f848e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test_plus/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class MyClassTest(CBVTestCase):
def test_special_method(self):
request = RequestFactory().get('/')
instance = self.setup(MyClass, request=request)
instance = self.get_instance(MyClass, request=request)
# invoke a MyClass method
result = instance.special_method()
Expand All @@ -277,9 +277,9 @@ def get_instance(self, cls, initkwargs=None, request=None, *args, **kwargs):
Returns a decorated instance of a class-based generic view class.
Use `initkwargs` to set expected class attributes.
For example you might set the class `object` attribute:
For example, set the `object` attribute on MyDetailView class:
instance = self.setup(MyDetailView, {'object': obj}, request)
instance = self.get_instance(MyDetailView, initkwargs={'object': obj}, request)
because SingleObjectMixin (part of generic.DetailView)
expects self.object to be set before invoking get_context_data().
Expand Down

0 comments on commit 7f848e4

Please sign in to comment.