connection tests. Add context managers