Exemplo n.º 1
0
    def test_print_config_paths(self, capsys):
        # To make debugging easier
        with capsys.disabled():
            print('paths in this env: ', config.getConfigPaths().user())
            print('paths in this env: ', config.getConfigPaths().app())
            print('paths in this env: ', config.getConfigPaths().config())
            print('paths in this env: ', config.getConfigPaths().log())
            print('paths in this env: ', config.getConfigPaths().templates())
            print('paths in this env: ', config.getConfigPaths().file_config())

            # Make sure the test reaches the config.ini.sample
            print(
                'paths in this env: ',
                os.path.join(
                    os.path.dirname(os.path.dirname(
                        os.path.abspath(__file__))), 'taskbutler',
                    config.staticConfig.filename_config_initial))
Exemplo n.º 2
0
 def test_create_log_paths(self):
     # create log
     runner = CliRunner()
     result = runner.invoke(cli.main)
     assert os.path.exists(config.getConfigPaths().log()) is True
Exemplo n.º 3
0
 def test_create_template_paths(self):
     # create templates
     runner = CliRunner()
     result = runner.invoke(cli.main)
     assert os.path.exists(config.getConfigPaths().templates()) is True
Exemplo n.º 4
0
 def test_create_initial_config(self):
     # create initial config
     runner = CliRunner()
     result = runner.invoke(cli.main)
     assert os.path.exists(config.getConfigPaths().file_config()) is True
Exemplo n.º 5
0
 def test_create_app_path(self):
     # create app
     runner = CliRunner()
     result = runner.invoke(cli.main)
     assert os.path.exists(config.getConfigPaths().app()) is True