[dashboard fix]Fix copy_dash unit test (#5323)

This commit is contained in:
Grace Guo
2018-07-01 08:47:57 -07:00
committed by Maxime Beauchemin
parent 089037f1aa
commit ad05700b6b

View File

@@ -175,7 +175,12 @@ class DashboardTests(SupersetTestCase):
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)