Exemplo n.º 1
0
 def modify_group(group):
     data = c.patch('/api/groups/{}/'.format(group), {
         'name': 'Group (edited) ' + faker.city(),
         'description': faker.text(),
     }).data
     print('modified group: ', group)
     return data
Exemplo n.º 2
0
 def make_group():
     data = c.post('/api/groups/', {
         'name': 'Group ' + faker.city(),
         'description': faker.text(),
         'timezone': 'Europe/Berlin',
         'address': faker.street_address(),
         'latitude': faker.latitude(),
         'longitude': faker.longitude()
     }).data
     print('created group: ', data['id'], data['name'])
     return data
 def make_group():
     data = c.post(
         '/api/groups/', {
             'name': 'Group ' + faker.city(),
             'description': faker.text(),
             'timezone': 'Europe/Berlin',
             'address': faker.street_address(),
             'latitude': faker.latitude(),
             'longitude': faker.longitude()
         }
     ).data
     Group.objects.filter(id=data['id']).update(is_open=True)
     conversation = c.get('/api/groups/{}/conversation/'.format(data['id']))
     data['conversation'] = conversation
     print('created group: ', data['id'], data['name'])
     return data