fix tests relying on assertThrows