'Test re-ordering of tabs with invalid tab list'

def test_reorder_tabs_invalid_list(self):

    orig_tab_ids = [tab.tab_id for tab in self.course.tabs]
    tab_ids = list(orig_tab_ids)
    (tab_ids[0], tab_ids[1]) = (tab_ids[1], tab_ids[0])
    resp = self.client.ajax_post(self.url, data={'tabs': [{'tab_id': tab_id} for tab_id in tab_ids]})
    self.assertEqual(resp.status_code, 400)
    resp_content = json.loads(resp.content)
    self.assertIn('error', resp_content)
