'Verify that drafts are imported in the correct order.'

def test_order(self):

    store = modulestore()
    course_items = import_course_from_xml(store, self.user.id, TEST_DATA_DIR, ['import_draft_order'], create_if_not_present=True)
    course_key = course_items[0].id
    sequential = store.get_item(course_key.make_usage_key('sequential', '0f4f7649b10141b0bdc9922dcf94515a'))
    verticals = sequential.children
    self.assertEqual(7, len(verticals))
    self.assertEqual(course_key.make_usage_key('vertical', 'z'), verticals[0])
    self.assertEqual(course_key.make_usage_key('vertical', '5a05be9d59fc4bb79282c94c9e6b88c7'), verticals[1])
    self.assertEqual(course_key.make_usage_key('vertical', 'a'), verticals[2])
    self.assertEqual(course_key.make_usage_key('vertical', 'second'), verticals[3])
    self.assertEqual(course_key.make_usage_key('vertical', 'b'), verticals[4])
    self.assertEqual(course_key.make_usage_key('vertical', 'd'), verticals[5])
    self.assertEqual(course_key.make_usage_key('vertical', 'c'), verticals[6])
    sequential = store.get_item(course_key.make_usage_key('sequential', 'secondseq'))
    verticals = sequential.children
    self.assertEqual(3, len(verticals))
    self.assertEqual(course_key.make_usage_key('vertical', 'asecond'), verticals[0])
    self.assertEqual(course_key.make_usage_key('vertical', 'secondsubsection'), verticals[1])
    self.assertEqual(course_key.make_usage_key('vertical', 'zsecond'), verticals[2])
