From: Clint Byrum Date: Wed, 1 May 2013 07:52:02 +0000 (-0700) Subject: Fix warning about using os.tempnam in test suite. X-Git-Tag: 2014.1~664^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=bbc772b3c7ace6ee904ea116356768447fa209ae;p=openstack-build%2Fheat-build.git Fix warning about using os.tempnam in test suite. Change-Id: Ibd725071ccdd9af951034685880f35ac678feae2 --- diff --git a/heat/tests/test_loguserdata.py b/heat/tests/test_loguserdata.py index 3717c2f0..133a870a 100644 --- a/heat/tests/test_loguserdata.py +++ b/heat/tests/test_loguserdata.py @@ -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')