PEP8 cleanups.

This commit is contained in:
Roberto Rosario
2016-04-27 20:31:02 -04:00
parent 3384c06c03
commit 23f40ac4aa
14 changed files with 32 additions and 60 deletions

View File

@@ -38,7 +38,7 @@ class EmbeddedSignatureManager(models.Manager):
try:
with document_version.open() as file_object:
signature_result = key.sign_file(
key.sign_file(
binary=True, file_object=file_object,
output=temporary_filename, passphrase=passphrase
)

View File

@@ -332,9 +332,6 @@ class EmbeddedSignaturesTestCase(TestCase):
self.assertEqual(EmbeddedSignature.objects.count(), 1)
with new_version.open() as file_object:
document_content_hash = hashlib.sha256(file_object.read()).hexdigest()
with new_version.open() as file_object:
file_object.seek(0, 2)
new_size = file_object.tell()

View File

@@ -5,7 +5,7 @@ from django.core.files import File
from django_downloadview.test import assert_download_response
from django_gpg.models import Key
from documents.models import Document, DocumentVersion
from documents.models import DocumentVersion
from documents.tests.literals import TEST_DOCUMENT_PATH
from documents.tests.test_views import GenericDocumentViewTestCase
from user_management.tests import (
@@ -325,8 +325,6 @@ class SignaturesViewTestCase(GenericDocumentViewTestCase):
for document in self.document_type.documents.all():
document.delete(to_trash=False)
from documents.models import DocumentType
old_hooks = DocumentVersion._post_save_hooks
DocumentVersion._post_save_hooks = {}
for count in range(TEST_UNSIGNED_DOCUMENT_COUNT):