'Only staff users can access the bulk upsert endpoint.'

def test_bulk_upsert_permissions(self):

    url = reverse('api_experiments:v0:data-bulk-upsert')
    data = []
    response = self.client.put(url, data, format='json')
    self.assertEqual(response.status_code, 401)
    user = UserFactory()
    self.client.login(username=user.username, password=UserFactory._DEFAULT_PASSWORD)
    response = self.client.put(url, data, format='json')
    self.assertEqual(response.status_code, 403)
    user.is_staff = True
    user.save()
    response = self.client.put(url, data, format='json')
    self.assertEqual(response.status_code, 200)
