          self.assertEqual(e.pk, 123)
          # Or we can use the real attribute name for the primary key:
          self.assertEqual(e.employee_code, 123)
  
          with self.assertRaises(AttributeError):
              e.id
  
      def test_in_bulk(self):
          """
          Custom pks work with in_bulk, both for integer and non-integer types
 
</s> remove         with self.assertRaises(AttributeError):
 </s> add         msg = "'CustomQuerySet' object has no attribute 'manager_only'"
        with self.assertRaisesMessage(AttributeError, msg): </s> remove                 with self.assertRaises(AttributeError):
 </s> add                 msg = "%r object has no attribute 'optout_public_method'" % manager.__class__.__name__
                with self.assertRaisesMessage(AttributeError, msg): </s> remove         with self.assertRaises(ValueError):
 </s> add         msg = 'Cannot force both insert and updating in model saving.'
        with self.assertRaisesMessage(ValueError, msg): </s> remove         with self.assertRaises(AttributeError):
 </s> add         msg = "type object 'Book' has no attribute 'objects'"
        with self.assertRaisesMessage(AttributeError, msg): </s> remove         with self.assertRaises(ValueError):
 </s> add         msg = 'Cannot force an update in save() with no primary key.'
        with self.assertRaisesMessage(ValueError, msg):
        with self.assertRaisesMessage(AttributeError, "'Employee' object has no attribute 'id'"):
          self.assertEqual(e.pk, 123)
          # Or we can use the real attribute name for the primary key:
          self.assertEqual(e.employee_code, 123)
  
        with self.assertRaisesMessage(AttributeError, "'Employee' object has no attribute 'id'"):
              e.id
  
      def test_in_bulk(self):
          """
          Custom pks work with in_bulk, both for integer and non-integer types
keep keep keep keep replace keep keep keep keep keep
 Used assertRaisesMessage() to test Django's error messages. 
tests/custom_pk/tests.py