PEP8 cleanups

This commit is contained in:
Roberto Rosario
2016-03-10 03:35:15 -04:00
parent e10ff8e8bd
commit 60b7ed6a6d
5 changed files with 5 additions and 12 deletions

View File

@@ -229,7 +229,7 @@ class DocumentMetadataTestCase(GenericDocumentViewTestCase):
with open(TEST_SMALL_DOCUMENT_PATH) as file_object:
document_2 = self.document_type.new_document(
file_object=File(file_object)
)
)
self.document.metadata.create(metadata_type=self.metadata_type)
document_2.metadata.create(metadata_type=self.metadata_type)
@@ -261,7 +261,7 @@ class DocumentMetadataTestCase(GenericDocumentViewTestCase):
with open(TEST_SMALL_DOCUMENT_PATH) as file_object:
document_2 = self.document_type.new_document(
file_object=File(file_object)
)
)
response = self.post(
'metadata:metadata_multiple_add', data={

View File

@@ -1,6 +1,5 @@
from __future__ import absolute_import, unicode_literals
from django.apps import apps
from django.utils.translation import ugettext_lazy as _
from kombu import Exchange, Queue
@@ -40,10 +39,6 @@ class SourcesApp(MayanAppConfig):
def ready(self):
super(SourcesApp, self).ready()
Document = apps.get_model(
app_label='documents', model_name='Document'
)
POP3Email = self.get_model('POP3Email')
IMAPEmail = self.get_model('IMAPEmail')
Source = self.get_model('Source')

View File

@@ -36,7 +36,7 @@ class DocumentUploadTestCase(GenericDocumentViewTestCase):
self.document.delete()
def test_upload_wizard_without_permission(self):
logged_in = self.client.login(
self.client.login(
username=TEST_USER_USERNAME, password=TEST_USER_PASSWORD
)
@@ -54,7 +54,7 @@ class DocumentUploadTestCase(GenericDocumentViewTestCase):
self.assertEqual(Document.objects.count(), 0)
def test_upload_wizard_with_permission(self):
logged_in = self.client.login(
self.client.login(
username=TEST_USER_USERNAME, password=TEST_USER_PASSWORD
)
@@ -81,7 +81,7 @@ class DocumentUploadTestCase(GenericDocumentViewTestCase):
permssion for the document type to the user
"""
logged_in = self.client.login(
self.client.login(
username=TEST_USER_USERNAME, password=TEST_USER_PASSWORD
)

View File

@@ -7,7 +7,6 @@ from django.core.urlresolvers import reverse, reverse_lazy
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _
from acls.models import AccessControlList

View File

@@ -10,7 +10,6 @@ from formtools.wizard.views import SessionWizardView
from common.mixins import ViewPermissionCheckMixin
from documents.forms import DocumentTypeSelectForm
from documents.permissions import permission_document_create
from metadata.forms import MetadataFormSet
from tags.forms import TagMultipleSelectionForm