'test export and import of pentabarf'

def test_export_import(self):

    self._publishEvent(1)
    resp = self.app.get('/api/v1/events/1')
    identifier = json.loads(resp.data).get('identifier')
    resp = self.app.get(('/e/%s/schedule/pentabarf.xml' % identifier))
    self.assertEqual(resp.status_code, 200)
    self.assertIn('conference', resp.data)
    print resp.data
    resp = self._upload(resp.data, '/api/v1/events/import/pentabarf', 'pb.xml')
    self.assertEqual(resp.status_code, 200)
    data = json.loads(self.app.get('/api/v1/events/2').data)
    self.assertEqual(data['id'], 2)
