Fixing bug in test_automodapi.py