update tests to fix some import issues and to explicitly turn off buffering where necessary