瀏覽代碼

Added an import to docs/topics/testing/advanced.txt example.

Tim Graham 10 年之前
父節點
當前提交
32b67b3fd1
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      docs/topics/testing/advanced.txt

+ 2 - 0
docs/topics/testing/advanced.txt

@@ -40,6 +40,8 @@ The following is a simple unit test using the request factory::
     from django.contrib.auth.models import AnonymousUser, User
     from django.test import TestCase, RequestFactory
 
+    from .views import my_view
+
     class SimpleTest(TestCase):
         def setUp(self):
             # Every test needs access to the request factory.