def test_handle_sequence_number_too_low_raises_exception_if_number_too_low( self, email_message): with pytest.raises(SessionError): pipeline_mock = MagicMock(BasePipeline) seq_num_app = SeqNumManagerApp(pipeline_mock) seq_num_app.receive_seq_num = 10 email_message.MsgSeqNum = 1 seq_num_app._handle_sequence_number_too_low(email_message)
def test_handle_sequence_number_too_low_skips_duplicates_with_low_sequence_numbers( self, email_message): with pytest.raises(StopMessageProcessing): pipeline_mock = MagicMock(BasePipeline) seq_num_app = SeqNumManagerApp(pipeline_mock) seq_num_app.receive_seq_num = 10 email_message.MsgSeqNum = 1 email_message.PossDupFlag = True seq_num_app._handle_sequence_number_too_low(email_message)