Fix tests for preliminary bulk api query