Normalize handling of temporary file and directory creation.
This commit is contained in:
@@ -2,18 +2,18 @@ from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from documents.tests import TEST_NON_ASCII_DOCUMENT_PATH
|
||||
from common.utils import mkdtemp
|
||||
|
||||
from ..classes import StagingFile
|
||||
|
||||
|
||||
class StagingFileTestCase(TestCase):
|
||||
def test_unicode_staging_file(self):
|
||||
temporary_directory = tempfile.mkdtemp()
|
||||
temporary_directory = mkdtemp()
|
||||
shutil.copy(TEST_NON_ASCII_DOCUMENT_PATH, temporary_directory)
|
||||
|
||||
filename = os.path.basename(TEST_NON_ASCII_DOCUMENT_PATH)
|
||||
|
||||
Reference in New Issue
Block a user