def test_main(monkeypatch):
    sync_main_mock = MagicMock()
    monkeypatch.setattr(client, 'sync_main', sync_main_mock)
    script.main()
    sync_main_mock.asset_called_once_with(
        script.async_main, default_config=script.get_default_config()
    )
Example #2
0
def test_get_default_config():
    parent_dir = os.path.dirname(os.getcwd())
    data_dir = os.path.join(os.path.dirname(shipitscript.__file__), 'data')
    assert script.get_default_config() == {
        'work_dir': os.path.join(parent_dir, 'work_dir'),
        'verbose': False,
        'mark_as_shipped_schema_file': os.path.join(data_dir, 'mark_as_shipped_task_schema.json'),
        'mark_as_started_schema_file': os.path.join(data_dir, 'mark_as_started_task_schema.json'),
    }
Example #3
0
def test_get_default_config():
    parent_dir = os.path.dirname(os.getcwd())
    assert get_default_config() == {
        'work_dir':
        os.path.join(parent_dir, 'work_dir'),
        'schema_file':
        os.path.join(os.getcwd(), 'shipitscript/data/shipit_task_schema.json'),
        'verbose':
        False,
    }
def test_get_default_config():
    parent_dir = os.path.dirname(os.getcwd())
    data_dir = os.path.join(os.path.dirname(shipitscript.__file__), "data")
    assert script.get_default_config() == {
        "work_dir":
        os.path.join(parent_dir, "work_dir"),
        "verbose":
        False,
        "mark_as_shipped_schema_file":
        os.path.join(data_dir, "mark_as_shipped_task_schema.json"),
        "create_new_release_schema_file":
        os.path.join(data_dir, "create_new_release_task_schema.json"),
    }