# Path: onedrived/od_main.py
# def init_task_pool_and_workers():
# def shutdown_workers():
# def init_webhook():
# def shutdown_webhook():
# def shutdown_callback(code, _):
# def get_repo_table(ctx):
# def update_subscription_for_repo(repo, subscription_id=None):
# def gen_start_repo_tasks(all_accounts):
# def delete_temp_files(all_accounts):
# def repo_updated_callback(repo):
# def main():


import tempfile
import unittest
import click
from onedrived import od_main




class TestMainCLI(unittest.TestCase):

    def setUp(self):
        self.tempdir = tempfile.TemporaryDirectory()
        click.get_app_dir = lambda x: self.tempdir.name + '/' + x
        od_main.context = od_main.load_context()
        od_main.context._create_config_dir_if_missing()

    def tearDown(self):
        self.tempdir.cleanup()

    def test_init_and_shutdown_task_workers(self):

# Path: onedrived/od_main.py
# def init_task_pool_and_workers():
# def shutdown_workers():
# def init_webhook():
# def shutdown_webhook():
# def shutdown_callback(code, _):
# def get_repo_table(ctx):
# def update_subscription_for_repo(repo, subscription_id=None):
# def gen_start_repo_tasks(all_accounts):
# def delete_temp_files(all_accounts):
# def repo_updated_callback(repo):
# def main():


# Path: tests/test_main_cli.py
import tempfile
import unittest
import click
from onedrived import od_main





class TestMainCLI(unittest.TestCase):

    def setUp(self):
        self.tempdir = tempfile.TemporaryDirectory()
        click.get_app_dir = lambda x: self.tempdir.name + '/' + x
        od_main.context = od_main.load_context()
        od_main.context._create_config_dir_if_missing()

    def tearDown(self):
        self.tempdir.cleanup()

    def test_init_and_shutdown_task_workers(self):

        od_main.init_task_pool_and_workers()