superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] mistercrunch closed pull request #5323: [dashboard fix]Fix copy_dash unit test
Date Sun, 01 Jul 2018 15:47:58 GMT
mistercrunch closed pull request #5323: [dashboard fix]Fix copy_dash unit test
URL: https://github.com/apache/incubator-superset/pull/5323
 
 
   

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/dashboard_tests.py b/tests/dashboard_tests.py
index 6cc5753689..3dda07bf17 100644
--- a/tests/dashboard_tests.py
+++ b/tests/dashboard_tests.py
@@ -175,7 +175,12 @@ def test_copy_dash(self, username='admin'):
         self.assertEqual(resp['dashboard_title'], 'Copy Of Births')
         self.assertEqual(resp['position_json'], orig_json_data['position_json'])
         self.assertEqual(resp['metadata'], orig_json_data['metadata'])
-        self.assertEqual(resp['slices'], orig_json_data['slices'])
+        # check every attribute in each dashboard's slices list,
+        # exclude modified and changed_on attribute
+        for index, slc in enumerate(orig_json_data['slices']):
+            for key in slc:
+                if key not in ['modified', 'changed_on']:
+                    self.assertEqual(slc[key], resp['slices'][index][key])
 
     def test_add_slices(self, username='admin'):
         self.login(username=username)


 

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Mime
View raw message