Fix PEP8 warnings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -649,7 +649,7 @@ class DocumentVersion(models.Model):
|
||||
self.mimetype, self.encoding = get_mimetype(
|
||||
file_object=file_object
|
||||
)
|
||||
except:
|
||||
except Exception:
|
||||
self.mimetype = ''
|
||||
self.encoding = ''
|
||||
finally:
|
||||
|
||||
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
||||
from ..literals import (
|
||||
DEFAULT_DELETE_PERIOD, DEFAULT_DELETE_TIME_UNIT
|
||||
)
|
||||
from ..models import Document, DocumentType
|
||||
from ..models import DocumentType
|
||||
from ..permissions import (
|
||||
permission_document_type_create, permission_document_type_delete,
|
||||
permission_document_type_edit, permission_document_type_view,
|
||||
@@ -213,6 +213,6 @@ class DocumentTypeQuickLabelViewsTestCase(GenericDocumentViewTestCase):
|
||||
obj=self.document_type, permission=permission_document_type_view
|
||||
)
|
||||
response = self._request_quick_label_list_view()
|
||||
self.assertContains(response, text=self.document_type_filename,
|
||||
status_code=200
|
||||
self.assertContains(
|
||||
response, text=self.document_type_filename, status_code=200
|
||||
)
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from datetime import timedelta
|
||||
import os
|
||||
import time
|
||||
|
||||
from django.conf import settings
|
||||
from django.test import override_settings
|
||||
|
||||
from common.tests import BaseTestCase
|
||||
@@ -18,7 +16,7 @@ from .base import GenericDocumentTestCase
|
||||
from .literals import (
|
||||
TEST_DOCUMENT_TYPE_LABEL, TEST_DOCUMENT_PATH, TEST_MULTI_PAGE_TIFF_PATH,
|
||||
TEST_PDF_INDIRECT_ROTATE_PATH, TEST_OFFICE_DOCUMENT_PATH,
|
||||
TEST_SMALL_DOCUMENT_FILENAME, TEST_SMALL_DOCUMENT_PATH
|
||||
TEST_SMALL_DOCUMENT_PATH
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user