def test_merge_dict_request(self):
        data = {
            'name': 'miao',
            'random_input': [1, 2, 3]
        }
        # Django test submits data as multipart-form by default,
        # which results in request.data being a MergeDict.
        # Wrote UserNoMergeDictViewSet to raise an exception (return 400)
        # if request.data ends up as MergeDict, is not a dict, or
        # is a dict of lists.
        request = Request(self.rf.post('/groups/', data))
        try:
            response = self.view(request)
            self.assertEqual(response.status_code, 201)
        except __HOLE__ as e:
            message = '{0}'.format(e)
            if 'request.FILES' not in message:
                self.fail('Unexpected error: %s' % message)
            # otherwise, this is a known DRF 3.2 bug
dataset/ETHPy150Open AltSchool/dynamic-rest/tests/test_viewsets.py/TestMergeDictConvertsToDict.test_merge_dict_request