def testTipsOnlyUrl(self): correctUrl = 'https://hg.mozilla.org/mozilla-central/json-pushes?full=1&tipsonly=1' poller = BaseHgPoller( hgURL='https://hg.mozilla.org', branch='mozilla-central', tipsOnly=True) url = poller._make_url() self.failUnlessEqual(url, correctUrl)
def testUrlWithUnicodeLastChangeset(self): correctUrl = 'http://hg.mozilla.org/mozilla-central/json-pushes?full=1&fromchange=123456' poller = BaseHgPoller(hgURL='http://hg.mozilla.org', branch='mozilla-central') poller.lastChangeset = u'123456' url = poller._make_url() self.failUnlessEqual(url, correctUrl) self.failUnless(isinstance(url, str))
def testUrlWithLastChangeset(self): correctUrl = 'https://hg.mozilla.org/mozilla-central/json-pushes?full=1&fromchange=123456' poller = BaseHgPoller( hgURL='https://hg.mozilla.org', branch='mozilla-central') poller.lastChangeset = '123456' url = poller._make_url() self.failUnlessEqual(url, correctUrl)
def testOverrideUrl(self): correctUrl = 'http://hg.mozilla.org/other_repo/json-pushes?full=1&fromchange=123456' poller = BaseHgPoller(hgURL='http://hg.mozilla.org', branch='mozilla-central', pushlogUrlOverride='http://hg.mozilla.org/other_repo/json-pushes?full=1') poller.lastChangeset = '123456' url = poller._make_url() self.failUnlessEqual(url, correctUrl)
def testTipsOnlyWithLastChangeset(self): # there's two possible correct URLs in this case correctUrls = [ 'https://hg.mozilla.org/releases/mozilla-1.9.1/json-pushes?full=1&fromchange=123456&tipsonly=1', 'https://hg.mozilla.org/releases/mozilla-1.9.1/json-pushes?full=1&tipsonly=1&fromchange=123456' ] poller = BaseHgPoller(hgURL='https://hg.mozilla.org', branch='releases/mozilla-1.9.1', tipsOnly=True) poller.lastChangeset = '123456' url = poller._make_url() self.failUnlessIn(url, correctUrls)
def testTipsOnlyWithLastChangeset(self): # there's two possible correct URLs in this case correctUrls = [ 'http://hg.mozilla.org/releases/mozilla-1.9.1/json-pushes?full=1&fromchange=123456&tipsonly=1', 'http://hg.mozilla.org/releases/mozilla-1.9.1/json-pushes?full=1&tipsonly=1&fromchange=123456' ] poller = BaseHgPoller(hgURL='http://hg.mozilla.org', branch='releases/mozilla-1.9.1', tipsOnly=True) poller.lastChangeset = '123456' url = poller._make_url() self.failUnlessIn(url, correctUrls)
def __init__(self): BaseHgPoller.__init__(self, 'http://localhost', 'whatever', repo_branch=repo_branch, maxChanges=maxChanges, mergePushChanges=mergePushChanges) self.emptyRepo = True
def __init__(self): BaseHgPoller.__init__(self, 'http://localhost', 'whatever', repo_branch=repo_branch) self.emptyRepo = True
def __init__(self): BaseHgPoller.__init__(self, 'http://localhost', 'whatever', repo_branch=repo_branch, maxChanges=maxChanges) self.emptyRepo = True
def testTipsOnlyUrl(self): correctUrl = 'http://hg.mozilla.org/mozilla-central/json-pushes?full=1&tipsonly=1' poller = BaseHgPoller(hgURL='http://hg.mozilla.org', branch='mozilla-central', tipsOnly=True) url = poller._make_url() self.failUnlessEqual(url, correctUrl)
def testSimpleUrl(self): correctUrl = 'http://hg.mozilla.org/mozilla-central/json-pushes?full=1' poller = BaseHgPoller(hgURL='http://hg.mozilla.org', branch='mozilla-central') url = poller._make_url() self.failUnlessEqual(url, correctUrl)