Esempio n. 1
0
def test_shortening_url_with_good_token(sess):
    url = 'https://us-east-1.console.aws.amazon.com/cloudwatch/home'
    shortened_url = to_bitly(sess=sess, url=url, access_token=access_token)
    assert shortened_url == 'http://amzn.to/2GQzbsA'
Esempio n. 2
0
def test_url_with_missing_token_is_unchanged(sess, bad_token):
    url = 'https://eu-west-1.console.aws.amazon.com/cloudwatch/home'
    shortened_url = to_bitly(sess=sess, url=url, access_token=bad_token)
    assert url == shortened_url