示例#1
0
 def test_create_group(self):
     with self.app.test_request_context('/'):
         result = groups.create_group(self.group_id2,
                                      copy.copy(self.group_params2))
         self.assertEqual(result, None)
         result = groups.get_group(self.group_id2)
         self.assertEqual(result, self.group_params2)
示例#2
0
def _create(name):
    params = request.get_json()
    if not isinstance(params, dict):
        abort(400)
    create_group(name, request.get_json())
    return make_response("", 201, [])