          data = {'id': 999, 'text': 'foobar'}
          request = factory.put('/1', data, format='json')
          with self.assertNumQueries(EXPECTED_QUERIES_FOR_PUT):
              response = self.view(request, pk=1).render()
          self.assertEqual(response.status_code, status.HTTP_200_OK)
          self.assertEqual(response.data, {'id': 1, 'text': 'foobar'})
          updated = self.objects.get(id=1)
          self.assertEqual(updated.text, 'foobar')
  
      def test_put_to_deleted_instance(self):
          """
 
</s> remove         self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(dict(response.data), {'id': 1, 'text': 'foobar'})
 </s> add         assert response.status_code == status.HTTP_200_OK
        assert dict(response.data) == {'id': 1, 'text': 'foobar'} </s> remove         self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(response.data, {'id': 1, 'text': 'foobar'})
 </s> add         assert response.status_code == status.HTTP_200_OK
        assert response.data == {'id': 1, 'text': 'foobar'} </s> remove         self.assertEqual(updated.text, 'foobar')
 </s> add         assert updated.text == 'foobar' </s> remove         self.assertEqual(response.status_code, status.HTTP_201_CREATED)
        self.assertEqual(response.data, {'id': 4, 'text': 'foobar'})
 </s> add         assert response.status_code == status.HTTP_201_CREATED
        assert response.data == {'id': 4, 'text': 'foobar'} </s> remove         self.assertEqual(updated.text, 'foobar')
 </s> add         assert updated.text == 'foobar'
        assert response.status_code == status.HTTP_200_OK
        assert response.data == {'id': 1, 'text': 'foobar'}
          data = {'id': 999, 'text': 'foobar'}
          request = factory.put('/1', data, format='json')
          with self.assertNumQueries(EXPECTED_QUERIES_FOR_PUT):
              response = self.view(request, pk=1).render()
        assert response.status_code == status.HTTP_200_OK
        assert response.data == {'id': 1, 'text': 'foobar'}
        assert response.status_code == status.HTTP_200_OK
        assert response.data == {'id': 1, 'text': 'foobar'}
          updated = self.objects.get(id=1)
          self.assertEqual(updated.text, 'foobar')
  
      def test_put_to_deleted_instance(self):
          """
keep keep keep keep replace replace keep keep keep keep keep
 converted test asserts of generics-test to pytest 
tests/test_generics.py