ALBS-334: Make the ability of Pungi to give module_defaults from remote sources #4

Merged
soksanichenko merged 8 commits from ALBS-334 into aln8 2022-05-04 17:05:45 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 8676941655 - Show all commits

View File

@ -98,7 +98,7 @@ class PackagesGenerator:
url=file_url,
)
file_request.raise_for_status()
with tempfile.NamedTemporaryFile(delete=True) as file_stream:
with tempfile.NamedTemporaryFile(delete=False) as file_stream:
file_stream.write(file_request.content)
return file_stream.name

View File

@ -50,7 +50,7 @@ class TestPackagesJson(TestCase):
file_name = PackagesGenerator.get_remote_file_content(
file_url='fakeurl')
mock_requests_get.assert_called_once_with(url='fakeurl')
mock_tempfile.assert_called_once_with(delete=True)
mock_tempfile.assert_called_once_with(delete=False)
mock_tempfile.return_value.__enter__().\
write.assert_called_once_with(b'TestContent')
self.assertEqual(