def test_patch_user_when_id_valid_should_patch_user_and_reply_200(self):
    riri = User.objects.create(first_name='Riri', last_name='Duck', email='example@example.com', password='dummy')
    request = self.factory.patch(reverse('v1:user-detail', kwargs={'pk': riri.pk}), data={'email': 'example@example.com'})
    user_detail_view = UserViewSet.as_view({'patch': 'partial_update'})
    response = user_detail_view(request, pk=riri.pk)
    self.assertEqual(status.HTTP_200_OK, response.status_code)
def test_patch_user_when_id_valid_should_patch_user_and_reply_200(self):
    riri = User.objects.create(first_name='Riri', last_name='Duck', email='example@example.com', password='dummy')
    request = self.factory.patch(reverse('v1:user-detail', kwargs={'pk': riri.pk}), data={'email': 'example@example.com'})
    user_detail_view = UserViewSet.as_view({'patch': 'partial_update'})
    response = user_detail_view(request, pk=riri.pk)
    self.assertEqual(status.HTTP_200_OK, response.status_code)