Fix tests

Some imports were incorrect which caused errors when running nosetests.