refactor tests to not use nock