diff --git a/mayan/apps/metadata/tests/test_views.py b/mayan/apps/metadata/tests/test_views.py index 7ed9e8290c..9e0c71d7eb 100644 --- a/mayan/apps/metadata/tests/test_views.py +++ b/mayan/apps/metadata/tests/test_views.py @@ -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={ diff --git a/mayan/apps/sources/apps.py b/mayan/apps/sources/apps.py index df0f73c794..076e4206b5 100644 --- a/mayan/apps/sources/apps.py +++ b/mayan/apps/sources/apps.py @@ -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') diff --git a/mayan/apps/sources/tests/test_views.py b/mayan/apps/sources/tests/test_views.py index 0239ecd286..be0d2fed47 100644 --- a/mayan/apps/sources/tests/test_views.py +++ b/mayan/apps/sources/tests/test_views.py @@ -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 ) diff --git a/mayan/apps/sources/views.py b/mayan/apps/sources/views.py index 56d3174533..04c2e88165 100644 --- a/mayan/apps/sources/views.py +++ b/mayan/apps/sources/views.py @@ -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 diff --git a/mayan/apps/sources/wizards.py b/mayan/apps/sources/wizards.py index 23300b9eab..9f790566f4 100644 --- a/mayan/apps/sources/wizards.py +++ b/mayan/apps/sources/wizards.py @@ -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