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