These thread-local changes are probably not being reset after the test execution, hence knock-on failures.  I'd suggest reimplementing as_user for taxonomy or adding teardown methods in test_helper to ensure they're set back to nil.