MCPcopy
hub / github.com/saltstack/salt / test_alias

Method test_alias

tests/unit/test_loader.py:624–641  ·  view source on GitHub ↗

Make sure that you can access alias-d modules

(self)

Source from the content-addressed store, hash-verified

622
623 @pytest.mark.slow_test
624 def test_alias(self):
625 """
626 Make sure that you can access alias-d modules
627 """
628 # ensure it doesn't exist
629 self.assertNotIn(self.module_key, self.loader)
630
631 self.update_module()
632 self.assertNotIn(f"{self.module_name}.test_alias", self.loader)
633 self.assertTrue(
634 isinstance(
635 self.loader[f"{self.module_name}.working_alias"],
636 salt.loader.lazy.LoadedFunc,
637 )
638 )
639 self.assertTrue(
640 inspect.isfunction(self.loader[f"{self.module_name}.working_alias"].func)
641 )
642
643 @pytest.mark.slow_test
644 def test_clear(self):

Callers

nothing calls this directly

Calls 1

update_moduleMethod · 0.95

Tested by

no test coverage detected