def on_reject(self, message):
    'Store reject reason and code for testing.'
    self.reject_code_received = message.code
    self.reject_reason_received = message.reason
Store reject reason and code for testing.
def on_reject(self, message):
    
    self.reject_code_received = message.code
    self.reject_reason_received = message.reason