

def setUp(self):
    self.admin_user = User.objects.create_superuser(username=TEST_ADMIN_USERNAME, email=TEST_ADMIN_EMAIL, password=TEST_ADMIN_PASSWORD)
    self.client = Client()
    logged_in = self.client.login(username=TEST_ADMIN_USERNAME, password=TEST_ADMIN_PASSWORD)
    self.assertTrue(logged_in)
    self.assertTrue(self.admin_user.is_authenticated())
    self.document_count = 4
    self.document_type = DocumentType.objects.create(label=TEST_DOCUMENT_TYPE)
    for i in range(self.document_count):
        with open(TEST_SMALL_DOCUMENT_PATH) as file_object:
            i.document_type.new_document(file_object=File(file_object), label='test document')

dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/dynamic_search/tests/test_views.py Issue46TestCase.setUp/VarMisuse@121/161 `self`->`i`