예제 #1
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.path.dirname(pushapkscript.__file__), 'data/pushapk_task_schema.json'),
        'verbose': False,
    }
예제 #2
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.path.dirname(pushapkscript.__file__),
                     "data/pushapk_task_schema.json"),
        "verbose":
        False,
    }
예제 #3
0
def test_main(monkeypatch):
    sync_main_mock = MagicMock()
    monkeypatch.setattr(client, 'sync_main', sync_main_mock)
    main()
    sync_main_mock.asset_called_once_with(async_main,
                                          default_config=get_default_config())