"""Integration tests for lambda function.""" import os import mysql.connector def test_invoke_check__db(): """Check ledger_db here.""" cnx = mysql.connector.connect( host=os.environ.get('MYSQL_HOST', '127.0.0.1'), port=os.environ.get('MYSQL_PORT', '18087'), database=os.environ.get('MYSQL_DB', 'royalty_accounting'), user=os.environ.get('MYSQL_USER', 'db_user'), password=os.environ.get('MYSQL_PASS', 'db_pass')) cursor = cnx.cursor() cursor.execute('SELECT * FROM payment_group_payment_payee') cursor.fetchall() rc = cursor.rowcount assert rc == 1 cnx.close()