avoid leaving stray temp files
This commit is contained in:
parent
8d8274a35e
commit
6002373ff9
8 changed files with 82 additions and 60 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import absolute_import
|
||||
import mock
|
||||
import shutil
|
||||
import tempfile
|
||||
import unittest
|
||||
from .loadkojid import kojid
|
||||
|
|
@ -75,9 +76,12 @@ class TestVolumeID(unittest.TestCase):
|
|||
self.session = mock.MagicMock()
|
||||
self.options = mock.MagicMock()
|
||||
self.options.literal_task_arches = ''
|
||||
workdir = tempfile.mkdtemp()
|
||||
self.workdir = tempfile.mkdtemp()
|
||||
self.handler = kojid.LiveCDTask(task_id, method, params, self.session,
|
||||
self.options, workdir)
|
||||
self.options, self.workdir)
|
||||
|
||||
def tearDown(self):
|
||||
shutil.rmtree(self.workdir)
|
||||
|
||||
def test_volume_id_substitutions(self):
|
||||
"""Check that volume ID is shorten corect by shortenVolID method."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue