def test_delete_compiled_records_for_syrx_nums(self, uow_mock): unmapped_syrx_num_handler = UnmappedSyrxNumHandler() syrx_nums = [{'syrx_num': '1'}, {'syrx_num': '2'}, {'syrx_num': '3'}] unmapped_syrx_num_handler.unmapped_syrx_nums = syrx_nums unmapped_syrx_num_handler._delete_compiled_records_for_syrx_nums() uow_mock.return_value.compiled_point_records.delete_for_syrx_num.assert_has_calls([call('1'), call('2'), call('3')])
def test_move_data_for_syrx_nums(self, _move_data_for_syrx_num, uow_mock): unmapped_syrx_num_handler = UnmappedSyrxNumHandler() syrx_num_list = [{'syrx_num': 1, 'vendor_point': {'source': 'Test'}}, {'syrx_num': 2, 'vendor_point': {'source': 'Test2'}}, {'syrx_num': 3, 'vendor_point': {'source': 'Test3'}}] unmapped_syrx_num_handler.unmapped_syrx_nums = syrx_num_list unmapped_syrx_num_handler._move_data_for_syrx_nums() _move_data_for_syrx_num.assert_has_calls([call(syrx_num_list[0]), call(syrx_num_list[1]), call(syrx_num_list[2])]) uow_mock.return_value.unmapped_syrx_nums.remove_syrx_num.assert_has_calls([call(syrx_num_list[0]['syrx_num']), call(syrx_num_list[1]['syrx_num']), call(syrx_num_list[2]['syrx_num']) ])