Code cleanups.

This commit is contained in:
Roberto Rosario
2017-01-28 22:56:52 -04:00
parent 562a9dea70
commit 914c5e7146
4 changed files with 5 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
def skip_file_descriptor_check(func): def skip_file_descriptor_check(func):
def func_wrapper(item): def func_wrapper(item):
item._skip_file_descriptor_test = True item._skip_file_descriptor_test = True
return func(item) return func(item)
return func_wrapper return func_wrapper

View File

@@ -66,7 +66,7 @@ class TempfileCheckMixin(object):
msg='Orphan temporary file. The number of temporary files and/or ' msg='Orphan temporary file. The number of temporary files and/or '
'directories at the start and at the end of the test are not the ' 'directories at the start and at the end of the test are not the '
'same. Orphan entries: {}'.format( 'same. Orphan entries: {}'.format(
','.join(final_temporary_items-self._temporary_items) ','.join(final_temporary_items - self._temporary_items)
) )
) )
super(TempfileCheckMixin, self).tearDown() super(TempfileCheckMixin, self).tearDown()

View File

@@ -6,7 +6,6 @@ from django.contrib.auth.models import Group
from django.core.urlresolvers import clear_url_caches, reverse from django.core.urlresolvers import clear_url_caches, reverse
from django.http import HttpResponse from django.http import HttpResponse
from django.template import Context, Template from django.template import Context, Template
from django.test import TestCase
from permissions import Permission from permissions import Permission
from permissions.models import Role from permissions.models import Role

View File

@@ -2,7 +2,6 @@ from __future__ import absolute_import, unicode_literals
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from acls.models import AccessControlList
from documents.tests.test_views import GenericDocumentViewTestCase from documents.tests.test_views import GenericDocumentViewTestCase
from user_management.tests import ( from user_management.tests import (
TEST_USER_USERNAME, TEST_USER_PASSWORD TEST_USER_USERNAME, TEST_USER_PASSWORD