Normalize handling of temporary file and directory creation.

This commit is contained in:
Roberto Rosario
2016-06-23 20:53:50 -04:00
parent ab831aa493
commit 945158bd60
13 changed files with 65 additions and 36 deletions

View File

@@ -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)