(self)
| 642 | |
| 643 | @pytest.mark.slow_test |
| 644 | def test_clear(self): |
| 645 | self.assertTrue( |
| 646 | isinstance(self.loader["test.ping"], salt.loader.lazy.LoadedFunc) |
| 647 | ) |
| 648 | self.assertTrue(inspect.isfunction(self.loader["test.ping"].func)) |
| 649 | self.update_module() # write out out custom module |
| 650 | self.loader.clear() # clear the loader dict |
| 651 | |
| 652 | # force a load of our module |
| 653 | self.assertTrue( |
| 654 | isinstance(self.loader[self.module_key], salt.loader.lazy.LoadedFunc) |
| 655 | ) |
| 656 | self.assertTrue(inspect.isfunction(self.loader[self.module_key].func)) |
| 657 | |
| 658 | # make sure we only loaded our custom module |
| 659 | # which means that we did correctly refresh the file mapping |
| 660 | for k, v in self.loader._dict.items(): |
| 661 | self.assertTrue(k.startswith(self.module_name)) |
| 662 | |
| 663 | @pytest.mark.slow_test |
| 664 | def test_load(self): |
nothing calls this directly
no test coverage detected