      def test_reverse_foreign_key_update(self):
          data = {'url': 'http://testserver/foreignkeytarget/2/', 'name': 'target-2', 'sources': ['http://testserver/foreignkeysource/1/', 'http://testserver/foreignkeysource/3/']}
          instance = ForeignKeyTarget.objects.get(pk=2)
          serializer = ForeignKeyTargetSerializer(instance, data=data, context={'request': request})
          self.assertTrue(serializer.is_valid())
          # We shouldn't have saved anything to the db yet since save
          # hasn't been called.
          queryset = ForeignKeyTarget.objects.all()
          new_serializer = ForeignKeyTargetSerializer(queryset, many=True, context={'request': request})
          expected = [
 
</s> remove         self.assertFalse(serializer.is_valid())
        self.assertEqual(serializer.errors, {'target': ['Incorrect type. Expected URL string, received int.']})
 </s> add         assert not serializer.is_valid()
        assert serializer.errors == {'target': ['Incorrect type. Expected URL string, received int.']} </s> remove         self.assertEqual(serializer.data, data)
        self.assertEqual(obj.name, 'target-3')
 </s> add         assert serializer.data == data
        assert obj.name == 'target-3' </s> remove         self.assertEqual(serializer.data, expected)
 </s> add         assert serializer.data == expected </s> remove             self.assertEqual(serializer.data, expected)
 </s> add             assert serializer.data == expected </s> remove         self.assertEqual(serializer.data, data)
 </s> add         assert serializer.data == data
        assert serializer.is_valid()
      def test_reverse_foreign_key_update(self):
          data = {'url': 'http://testserver/foreignkeytarget/2/', 'name': 'target-2', 'sources': ['http://testserver/foreignkeysource/1/', 'http://testserver/foreignkeysource/3/']}
          instance = ForeignKeyTarget.objects.get(pk=2)
          serializer = ForeignKeyTargetSerializer(instance, data=data, context={'request': request})
        assert serializer.is_valid()
          # We shouldn't have saved anything to the db yet since save
          # hasn't been called.
          queryset = ForeignKeyTarget.objects.all()
          new_serializer = ForeignKeyTargetSerializer(queryset, many=True, context={'request': request})
          expected = [
keep keep keep keep replace keep keep keep keep keep
 converted test asserts of hyperlin relations to pytest 
tests/test_relations_hyperlink.py