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.

28 lines
801 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. HOST = "127.0.0.1"
  9. PORT = odoo.tools.config["http_port"]
  10. class TestControllerRegistry(BaseRestCase):
  11. def test_controller_registry(self):
  12. controllers = controllers_per_module["easy_my_coop_api"]
  13. self.assertEqual(len(controllers), 1)
  14. self.assertIn(
  15. (
  16. "odoo.addons.easy_my_coop_api"
  17. ".controllers.controllers.UserController",
  18. UserController,
  19. ),
  20. controllers,
  21. )