'The endpoint should support creating/updating multiple ExperimentData objects with a single call.'

def test_bulk_upsert(self):

    url = reverse('api_experiments:v0:data-bulk-upsert')
    experiment_id = 1
    user = UserFactory(is_staff=True)
    other_user = UserFactory()
    self.client.login(username=user.username, password=UserFactory._DEFAULT_PASSWORD)
    data = [{'experiment_id': experiment_id, 'key': 'foo', 'value': 'bar', 'user': user.username}, {'experiment_id': experiment_id, 'key': 'foo', 'value': 'bar', 'user': other_user.username}]
    response = self.client.put(url, data, format='json')
    self.assertEqual(response.status_code, 200)
    kwargs = {'experiment_id': experiment_id, 'key': 'foo', 'value': 'bar'}
    ExperimentData.objects.get(user=user, **kwargs)
    ExperimentData.objects.get(user=other_user, **kwargs)
    response = self.client.put(url, data, format='json')
    self.assertEqual(response.status_code, 200)
    ExperimentData.objects.get(user=user, **kwargs)
    ExperimentData.objects.get(user=other_user, **kwargs)
