def test_change_parameter(self): self.assertEqual('http://www.google.com?trk=python', bitlyref.add_referrer('http://www.google.com', 'trk', 'python'))
def test_add_referrer(self): self.assertEqual('http://www.google.com?ref=python', bitlyref.add_referrer('http://www.google.com', 'ref', 'python'))
def test_add_to_query_string(self): self.assertEqual('http://www.google.com?q=test&ref=python', bitlyref.add_referrer('http://www.google.com?q=test', 'ref', 'python'))