def test_post_bulk_from_list(self):
        data = [
            {
                'name': 'foo',
                'random_input': [1, 2, 3],
            },
            {
                'name': 'bar',
                'random_input': [4, 5, 6],
            }
        ]
        request = self.rf.post(
            '/groups/',
            json.dumps(data),
            content_type='application/json'
        )
        response = self.view(request)
        self.assertEqual(response.status_code, status.HTTP_201_CREATED)
        self.assertEqual(2, Group.objects.all().count())
        self.assertEqual(
            ['foo', 'bar'],
            list(Group.objects.all().values_list('name', flat=True))
        )
Test that POST request with multiple resources created all posted
dataset/ETHPy150Open AltSchool/dynamic-rest/tests/test_viewsets.py/TestBulkAPI.test_post_bulk_from_list