          data = {'text': 'foo'}
          filtered_out_pk = BasicModel.objects.filter(text='filtered out')[0].pk
          request = factory.put('/{0}'.format(filtered_out_pk), data, format='json')
          response = self.view(request, pk=filtered_out_pk).render()
          self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
  
      def test_patch_cannot_create_an_object(self):
          """
          PATCH requests should not be able to create objects.
          """
 
</s> remove         self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
 </s> add         assert response.status_code == status.HTTP_404_NOT_FOUND </s> remove         self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
 </s> add         assert response.status_code == status.HTTP_404_NOT_FOUND </s> remove         self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
        self.assertFalse(self.objects.filter(id=999).exists())
 </s> add         assert response.status_code == status.HTTP_404_NOT_FOUND
        assert not self.objects.filter(id=999).exists() </s> remove         self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
        self.assertEqual(response.data, {"detail": 'Method "DELETE" not allowed.'})
 </s> add         assert response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED
        assert response.data == {"detail": 'Method "DELETE" not allowed.'} </s> remove         self.assertEqual(updated.text, 'foobar')
 </s> add         assert updated.text == 'foobar'
        assert response.status_code == status.HTTP_404_NOT_FOUND
          data = {'text': 'foo'}
          filtered_out_pk = BasicModel.objects.filter(text='filtered out')[0].pk
          request = factory.put('/{0}'.format(filtered_out_pk), data, format='json')
          response = self.view(request, pk=filtered_out_pk).render()
        assert response.status_code == status.HTTP_404_NOT_FOUND
  
      def test_patch_cannot_create_an_object(self):
          """
          PATCH requests should not be able to create objects.
          """
keep keep keep keep replace keep keep keep keep keep
 converted test asserts of generics-test to pytest 
tests/test_generics.py