示例#1
0
def run():
    try:
        create_app_dirs()
        create_database_if_nonexistent()
        confirm_database_is_updated()
        cmdgroup()
    except BotError as e:
        click.echo(f"Error: {e}")
示例#2
0
def test_confirm_db_updated_false(calculate):
    calculate.return_value = True
    with pytest.raises(BotError):
        confirm_database_is_updated()
示例#3
0
def test_confirm_db_updated_updating(sys, calculate):
    sys.argv = ['chitanda', 'migrate']
    calculate.return_value = True
    confirm_database_is_updated()
示例#4
0
def test_confirm_db_updated_true(calculate):
    calculate.return_value = False
    confirm_database_is_updated()