Revision 24d1788b snf-tools/synnefo_tools/burnin/pithos_tests.py
b/snf-tools/synnefo_tools/burnin/pithos_tests.py | ||
---|---|---|
85 | 85 |
def test_004_upload_file(self): |
86 | 86 |
"""Test uploading a txt file to Pithos""" |
87 | 87 |
# Create a tmp file |
88 |
with tempfile.TemporaryFile() as fout: |
|
88 |
with tempfile.TemporaryFile(dir=self.temp_directory) as fout:
|
|
89 | 89 |
fout.write("This is a temp file") |
90 | 90 |
fout.seek(0, 0) |
91 | 91 |
# Upload the file, |
... | ... | |
97 | 97 |
def test_005_download_file(self): |
98 | 98 |
"""Test downloading the file from Pithos""" |
99 | 99 |
# Create a tmp directory to save the file |
100 |
with tempfile.TemporaryFile() as fout: |
|
100 |
with tempfile.TemporaryFile(dir=self.temp_directory) as fout:
|
|
101 | 101 |
self.clients.pithos.download_object("test.txt", fout) |
102 | 102 |
# Now read the file |
103 | 103 |
fout.seek(0, 0) |
Also available in: Unified diff