          self.assertEqual(new_source.pk, target_pk)
          # When: Trying to create a second object
          second_source = OneToOnePKSourceSerializer(data=data)
          self.assertFalse(second_source.is_valid())
          expected = {'target': [u'one to one pk source with this target already exists.']}
          self.assertDictEqual(second_source.errors, expected)
  
      def test_one_to_one_when_primary_key_does_not_exist(self):
          # Given: a target PK that does not exist
          target_pk = self.target.pk + self.alt_target.pk
 
</s> remove         class Point(object):
 </s> add         class Point: </s> remove @python_2_unicode_compatible
class PKOnlyObject(object):
 </s> add class PKOnlyObject: </s> remove         @python_2_unicode_compatible
        class MockLazyStr(object):
 </s> add         class MockLazyStr: </s> remove         super(HyperlinkedIdentityField, self).__init__(view_name, **kwargs)
 </s> add         super().__init__(view_name, **kwargs) </s> remove         self.assertEqual(unicode_repr(TestSerializer()), expected)
 </s> add         self.assertEqual(repr(TestSerializer()), expected)
        expected = {'target': ['one to one pk source with this target already exists.']}
          self.assertEqual(new_source.pk, target_pk)
          # When: Trying to create a second object
          second_source = OneToOnePKSourceSerializer(data=data)
          self.assertFalse(second_source.is_valid())
        expected = {'target': ['one to one pk source with this target already exists.']}
          self.assertDictEqual(second_source.errors, expected)
  
      def test_one_to_one_when_primary_key_does_not_exist(self):
          # Given: a target PK that does not exist
          target_pk = self.target.pk + self.alt_target.pk
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
tests/test_relations_pk.py