'Tests order of export of fields in export files'

def test_export_order(self):

    self._create_set()
    dr = 'static/uploads/test_event_import'
    data = open((dr + '/event'), 'r').read()
    self.assertTrue((data.find('id') < data.find('background_image')))
    self.assertTrue((data.find('location_name') < data.find('copyright')))
    self.assertTrue((data.find('event_ver') < data.find('tracks_ver')))
    data = open((dr + '/sessions'), 'r').read()
    self.assertTrue((data.find('id') < data.find('audio')))
    self.assertTrue((data.find('short_abstract') < data.find('slides')))
    data = open((dr + '/sponsors'), 'r').read()
    self.assertTrue((data.find('name') < data.find('description')))
