Example #1
0
 def test_project_commands_valid_clipy(self, mocker, fake_metadata):
     Module = namedtuple("Module", ["cli"])
     mocker.patch(
         "kedro.framework.cli.cli.importlib.import_module",
         return_value=Module(cli=cli),
     )
     mocker.patch("kedro.framework.cli.cli._is_project", return_value=True)
     mocker.patch("kedro.framework.cli.cli.bootstrap_project",
                  return_value=fake_metadata)
     kedro_cli = KedroCLI(fake_metadata.project_path)
     assert len(kedro_cli.project_groups) == 5
     assert kedro_cli.project_groups == [
         catalog_cli,
         jupyter_cli,
         pipeline_cli,
         project_group,
         cli,
     ]
Example #2
0
 def test_project_commands_no_project(self, mocker, tmp_path):
     mocker.patch(
         "kedro.framework.cli.cli.KedroCLI._load_project", return_value=None
     )
     kedro_cli = KedroCLI(tmp_path)
     assert len(kedro_cli.project_groups) == 0
Example #3
0
 def test_project_commands_no_project(self, mocker, tmp_path):
     mocker.patch("kedro.framework.cli.cli._is_project", return_value=False)
     kedro_cli = KedroCLI(tmp_path)
     assert len(kedro_cli.project_groups) == 0
     assert kedro_cli._metadata is None