- result = self.app.get('/berichte/bahnen/{}'.format(bahnen))
- self.assertTrue(result.data.startswith(b'<?xml'))
- root = et.fromstring(result.data)
- self.assertIn('Rodelbahnberichte', root.find('{http://www.w3.org/2005/Atom}title').text)
- self.assertEqual(len(root.findall('{http://www.w3.org/2005/Atom}entry')), count, 'bahnen "{}" not found {} times'.format(bahnen, count))
+ with self.subTest(bahnen=bahnen):
+ result = self.app.get('/berichte/bahnen/{}'.format(bahnen))
+ self.assertTrue(result.data.startswith(b'<?xml'))
+ root = et.fromstring(result.data)
+ self.assertIn('Rodelbahnberichte', root.find('{http://www.w3.org/2005/Atom}title').text)
+ self.assertEqual(len(root.findall('{http://www.w3.org/2005/Atom}entry')), count, 'bahnen "{}" not found {} times'.format(bahnen, count))