(self)
| 636 | self.assertEqual(action_params.get("config_param"), "So generic") |
| 637 | |
| 638 | def test_get_config(self): |
| 639 | with mock.patch( |
| 640 | "st2common.util.config_loader.ContentPackConfigLoader" |
| 641 | ) as config_loader: |
| 642 | mock_config_return = {"generic_config_param": "So generic"} |
| 643 | |
| 644 | config_loader().get_config.return_value = mock_config_return |
| 645 | |
| 646 | self.assertEqual(get_config(None, None), {}) |
| 647 | self.assertEqual(get_config("pack", None), {}) |
| 648 | self.assertEqual(get_config(None, "user"), {}) |
| 649 | self.assertEqual(get_config("pack", "user"), mock_config_return) |
| 650 | |
| 651 | config_loader.assert_called_with(pack_name="pack", user="user") |
| 652 | config_loader().get_config.assert_called_once() |
| 653 | |
| 654 | def _get_liveaction_model(self, params, with_config_context=False): |
| 655 | status = "initializing" |
nothing calls this directly
no test coverage detected