def METHOD_NAME(self):
    # issue few codes
    recipient = "fewcodes@a.com"
    code1: Code = Code.create_for_user(user=self.new_user, recipient=recipient, length=settings.AUTH_CODE_LENGTH)
    code2: Code = Code.create_for_user(user=self.new_user, recipient=recipient, length=settings.AUTH_CODE_LENGTH)
    # for stability test runs
    code2.created_at -= timedelta(seconds=1)
    code2.save()
    with self.assertRaises(InvalidCode):
        Code.check_code(recipient=recipient, code=code2.code)
    # first one is successful
    user = Code.check_code(recipient=recipient, code=code1.code)
    self.assertEqual(user.id, self.new_user.id)