I am new to Python unit testing and I am not sure how i can create a unit test of this function that returns a connection make sure that it always returns something?
For unit testing any SQL connection, you can use the command SELECT 1 which will always return 1 if the command executed successfully. You can specify more columns, column names, and types by just specifying the values in the query.
Example: SELECT 1 as NUMBER, 'hello world' as TEXT
Redshift connection unit testing in Python