Remove some unnecessary code from tests