Fix warning about using os.tempnam in test suite.

Change-Id: Ibd725071ccdd9af951034685880f35ac678feae2
This commit is contained in:
Clint Byrum 2013-05-01 00:52:02 -07:00
parent a0df5125f4
commit bbc772b3c7
1 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@
# under the License.
import errno
import fixtures
import os
import pkg_resources
import subprocess
@ -85,7 +86,8 @@ class LoguserdataTest(HeatTestCase):
self.m.VerifyAll()
def test_create_log(self):
log_name = os.tmpnam()
tempdir = self.useFixture(fixtures.TempDir())
log_name = os.path.join(tempdir.path, 'test_log')
with loguserdata.create_log(log_name) as log:
log.write('testing')