Fix tests to wait for results of requests
Fix segment integration to use api url property
Add class to easily switch out whether running tests off of production or locally