Skip to content

Conversation

@mathiasfrancke
Copy link
Member

No description provided.

@mathiasfrancke mathiasfrancke marked this pull request as draft April 14, 2025 17:34
@mathiasfrancke
Copy link
Member Author

For me locally the unit test test_action_confirm() is failing in last assertion. The problem there is that the generated file is using an ASCII coded umlaut (\xf6=ö) but the expected result is using the umlaut.

I'm not sure whether the ASCII coded umlaut is a valid case or not.

Copy link

@thienvh332 thienvh332 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me locally the unit test test_action_confirm() is failing in last assertion.

Hi @mathiasfrancke,
This issue was caused by my mistake, as I only tested with ASCII characters, while the encoding used by edi.exchange.type is ISO-8859-1.
You can fix this by applying the changes I suggested. The same fix should be applied in a few other similar places as well.

If you need anything, feel free to tag me 😉

self.partner_2 = self.env.ref("base.res_partner_12")
self.exc_type_input = self.env.ref(
"edi_purchase_edifact_oca.edi_exchange_type_purchase_order_input"
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
)
)
self.exc_type_output = self.env.ref("edi_purchase_edifact_oca.edi_exchange_type_purchase_order_out")

Comment on lines +150 to +152
self.assertEqual(
exchange_record.exchange_file, b64encode(expected_data.encode())
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.assertEqual(
exchange_record.exchange_file, b64encode(expected_data.encode())
)
self.assertEqual(
exchange_record.exchange_file, b64encode(expected_data.encode(self.exc_type_output.encoding)))

@fkantelberg fkantelberg force-pushed the 14.0-mig-edi_purchase_edifact_oca branch from f4c8442 to 3400bd7 Compare July 28, 2025 09:26
@fkantelberg fkantelberg force-pushed the 14.0-mig-edi_purchase_edifact_oca branch from 3400bd7 to 1527e24 Compare July 28, 2025 09:37
@fkantelberg fkantelberg force-pushed the 14.0-mig-edi_purchase_edifact_oca branch from 854e8dc to d850245 Compare October 13, 2025 10:44
@fkantelberg fkantelberg force-pushed the 14.0-mig-edi_purchase_edifact_oca branch from c3a4fb3 to 44679d3 Compare October 17, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants