Skip to content

Commit

Permalink
edi_endpoint: temp fix for tests
Browse files Browse the repository at this point in the history
I don't know why but  when test_edi_endpoint runs before these tests
the rollback of the exception catched within the test `test_archive_check`
make the controller lookup fail.
Since the whole routing registry machinery is going to be refactored
in OCA/edi#633
let's survive w/ this forced registration for now.
  • Loading branch information
simahawk authored and SilvioC2C committed Dec 3, 2024
1 parent 8ee2db8 commit 7ec0762
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions edi_endpoint_oca/tests/test_edi_endpoint_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
class EDIEndpointHttpCase(HttpCase):
def setUp(self):
super().setUp()
# I don't know why but when test_edi_endpoint runs before these tests
# the rollback of the exception catched within the test `test_archive_check`
# make the controller lookup fail.
# Since the whole routing registry machinery is going to be refactored
# in https://github.com/OCA/edi/pull/633
# let's survive w/ this forced registration for now.
self.env.ref("edi_endpoint_oca.edi_endpoint_demo_1")._register_controllers(
init=True
)

def test_call1(self):
response = self.url_open("/edi/demo/try")
Expand Down

0 comments on commit 7ec0762

Please sign in to comment.