You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/01/06 06:17:13 UTC

[GitHub] feng-tao closed pull request #4446: [AIRFLOW-3636] Fix a test introduced in #4425

feng-tao closed pull request #4446: [AIRFLOW-3636] Fix a test introduced in #4425
URL: https://github.com/apache/airflow/pull/4446
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/www/test_views.py b/tests/www/test_views.py
index afe59a61fe..f772e2924b 100644
--- a/tests/www/test_views.py
+++ b/tests/www/test_views.py
@@ -402,7 +402,7 @@ def test_get_logs_with_metadata_as_download_file(self):
 
         content_disposition = response.headers.get('Content-Disposition')
         self.assertTrue(content_disposition.startswith('attachment'))
-        self.assertTrue(content_disposition.endswith(expected_filename))
+        self.assertTrue(expected_filename in content_disposition)
         self.assertEqual(200, response.status_code)
         self.assertIn('Log for testing.', response.data.decode('utf-8'))
 
diff --git a/tests/www_rbac/test_views.py b/tests/www_rbac/test_views.py
index 01863f5777..062b7c2abf 100644
--- a/tests/www_rbac/test_views.py
+++ b/tests/www_rbac/test_views.py
@@ -566,7 +566,7 @@ def test_get_logs_with_metadata_as_download_file(self):
                                   quote_plus(self.DEFAULT_DATE.isoformat()),
                                   try_number,
                                   json.dumps({}))
-        response = self.app.get(url)
+        response = self.client.get(url)
         expected_filename = '{}/{}/{}/{}.log'.format(self.DAG_ID,
                                                      self.TASK_ID,
                                                      self.DEFAULT_DATE.isoformat(),
@@ -574,7 +574,7 @@ def test_get_logs_with_metadata_as_download_file(self):
 
         content_disposition = response.headers.get('Content-Disposition')
         self.assertTrue(content_disposition.startswith('attachment'))
-        self.assertTrue(content_disposition.endswith(expected_filename))
+        self.assertTrue(expected_filename in content_disposition)
         self.assertEqual(200, response.status_code)
         self.assertIn('Log for testing.', response.data.decode('utf-8'))
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services