From 3946c76aaec9ccb3d090db7fcb1dfe075e4b6314 Mon Sep 17 00:00:00 2001 From: Grace Guo Date: Sun, 1 Jul 2018 08:47:57 -0700 Subject: [PATCH] [dashboard fix]Fix copy_dash unit test (#5323) (cherry picked from commit ad05700) --- tests/dashboard_tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/dashboard_tests.py b/tests/dashboard_tests.py index 6cc575368935a..3dda07bf17385 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)