fix tests when url gets a hash appended to it

/cc @ianstormtaylor