def test_links(self):
        for method_name in ['info', 'category', 'social',
                            'location', 'language', 'encoders_count']:
            method = getattr(
                    self.service.link(link='http://foo.bar'), method_name)
            method()
            self.expect('GET', '/link/%s' % method_name, {
                'link': 'http://foo.bar'
            })

        self.service.link(link='http://foo.bar').content()
        self.expect('GET', '/link/content', {
            'link': 'http://foo.bar'
        })
        self.service.link(link='http://foo.bar').content(content_type='text')
        self.expect('GET', '/link/content', {
            'content_type': 'text',
            'link': 'http://foo.bar'
        })

        for method_name in ['clicks', 'countries', 'referrers',
                            'referrers_by_domain', 'referring_domains',
                            'shares']:
            method = getattr(
                    self.service.link(link='http://foo.bar'), method_name)

            method()
            self.expect('GET', '/link/%s' % method_name, {
                'link': 'http://foo.bar'
            })
            method(timezone='Europe/Andorra')
            self.expect('GET', '/link/%s' % method_name, {
                'link': 'http://foo.bar',
                'timezone': 'Europe/Andorra'
            })
            method(timezone='Europe/Andorra', unit='month')
            self.expect('GET', method_name % '/link/%s', {
                'link': 'http://foo.bar',
                'unit': 'month',
                'timezone': 'Europe/Andorra'
            })
            method(timezone='Europe/Andorra', unit='month')
            self.expect('GET', '/link/%s' % method_name, {
                'link': 'http://foo.bar',
                'unit': 'month',
                'timezone': 'Europe/Andorra'
            })
dataset/ETHPy150Open ducksboard/libsaas/test/test_bitly.py/BitlyTestCase.test_links/swapped operands of `%`