Convert the python cursor test to use the unittest framework