[bug 766394] Tests for generate_short_url.

Tests run and pass. Also added custom exceptions
for generate_short_url bitly errors.