Exemplo n.º 1
0
 def test_download_archive_conn_err(self):
     """test_download_archive_conn_err"""
     download_server_host = "http://invalidhost:8080"
     with tempfile.NamedTemporaryFile(delete=True) as tmp_file:
         success = download_archive("%s/api/v1/download/insights-archive.tar.gz" % download_server_host,
                                    tmp_file)
     assert not success
Exemplo n.º 2
0
 def test_download_archive_404(self):
     """test_download_archive_404"""
     download_server_host = os.getenv("DOWNLOAD_SERVER_HOST")
     with tempfile.NamedTemporaryFile(delete=True) as tmp_file:
         success = download_archive("%s/api/v1/download/insights-archive-404.tar.gz" % download_server_host,
                                    tmp_file)
     assert not success