def modify_group(group):
     response = c.patch(
         '/api/groups/{}/'.format(group), {
             'name': 'Group (edited) ' + faker.city(),
             'description': faker.text(),
         })
     if response.status_code != 200:
         raise Exception('could not modify group', group, response.data)
     print('modified group: ', group)
     return response.data
 def make_group():
     response = c.post(
         '/api/groups/', {
             'name': 'Group ' + faker.city(),
             'description': faker.text(),
             'timezone': 'Europe/Berlin',
             'address': faker.street_address(),
             'latitude': faker.latitude(),
             'longitude': faker.longitude()
         })
     if response.status_code != 201:
         raise Exception('could not make group', response.data)
     data = response.data
     conversation = c.get('/api/groups/{}/conversation/'.format(
         data['id'])).data
     data['conversation'] = conversation
     print('created group: ', data['id'], data['name'])
     return data