You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
743 B

  1. # Copyright 2020 Coop IT Easy SCRL fs
  2. # Robin Keunen <robin@coopiteasy.be>
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. import odoo
  5. from odoo.http import controllers_per_module
  6. from odoo.addons.base_rest.tests.common import BaseRestCase
  7. from ..controllers.controllers import UserController
  8. class TestControllerRegistry(BaseRestCase):
  9. def test_controller_registry(self):
  10. controllers = controllers_per_module["easy_my_coop_api"]
  11. self.assertEqual(len(controllers), 1)
  12. self.assertIn(
  13. (
  14. "odoo.addons.easy_my_coop_api"
  15. ".controllers.controllers.UserController",
  16. UserController,
  17. ),
  18. controllers,
  19. )