diff options
author | Andy Doan <andy.doan@linaro.org> | 2014-08-06 13:06:47 -0500 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2014-08-26 09:34:31 -0500 |
commit | dd683d1403d6830e81406313be82b0bd8f8ef8e8 (patch) | |
tree | 7f71dde1c98594e9424859813e5943067f725007 /license_protected_downloads/tests/test_buildinfo.py | |
parent | 7052bb0781caf888ccee96579f7c5c49936d193b (diff) |
buildinfo: fix broken test case
Change-Id: I57cc25e9332480f1ef7f6f44ae348b3d8d91a2bc
Diffstat (limited to 'license_protected_downloads/tests/test_buildinfo.py')
-rw-r--r-- | license_protected_downloads/tests/test_buildinfo.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/license_protected_downloads/tests/test_buildinfo.py b/license_protected_downloads/tests/test_buildinfo.py index b6f9806..25dcb7f 100644 --- a/license_protected_downloads/tests/test_buildinfo.py +++ b/license_protected_downloads/tests/test_buildinfo.py @@ -1,7 +1,10 @@ __author__ = 'dooferlad' import os +import shutil +import tempfile import unittest + from license_protected_downloads.buildinfo import BuildInfo from license_protected_downloads.buildinfo import IncorrectDataFormatException from license_protected_downloads.tests.helpers import temporary_directory @@ -297,8 +300,9 @@ class BuildInfoTests(unittest.TestCase): def test_write_from_array(self): build_info = BuildInfo(self.buildinfo_file_path) - file_path = THIS_DIRECTORY + \ - '/testserver_root/build-info/write-test/BUILD-INFO.txt' + file_path = tempfile.mkdtemp() + self.addCleanup(shutil.rmtree, file_path) + file_path = os.path.join(file_path, 'BUILD-INFO.txt') BuildInfo.write_from_array(build_info.build_info_array, file_path) build_info_test = BuildInfo(file_path) self.assertEquals(build_info_test.build_info_array, |