예제 #1
0
 def testOverrideUrl(self):
     correctUrl = 'https://hg.mozilla.org/other_repo/json-pushes?version=2&full=1&startID=42'
     poller = hgpoller.BaseHgPoller(
         hgURL='https://hg.mozilla.org', branch='mozilla-central',
         pushlogUrlOverride='https://hg.mozilla.org/other_repo/json-pushes?version=2&full=1')
     poller.lastPushID = 42
     url = poller._make_url()
     self.failUnlessEqual(url, correctUrl)
예제 #2
0
 def testTipsOnlyWithLastPushID(self):
     # there's two possible correct URLs in this case
     correctUrl = 'https://hg.mozilla.org/releases/mozilla-1.9.1/json-pushes?version=2&full=1&startID=42&tipsonly=1'
     poller = hgpoller.BaseHgPoller(hgURL='https://hg.mozilla.org',
                           branch='releases/mozilla-1.9.1', tipsOnly=True)
     poller.lastPushID = 42
     url = poller._make_url()
     self.failUnlessEqual(url, correctUrl)
예제 #3
0
 def testUrlWithUnicodeLastChangeset(self):
     correctUrl = 'https://hg.mozilla.org/mozilla-central/json-pushes?full=1&fromchange=123456'
     poller = hgpoller.BaseHgPoller(hgURL='https://hg.mozilla.org',
                                    branch='mozilla-central')
     poller.lastChangeset = u'123456'
     url = poller._make_url()
     self.failUnlessEqual(url, correctUrl)
     self.failUnless(isinstance(url, str))
예제 #4
0
 def testOverrideUrl(self):
     correctUrl = 'https://hg.mozilla.org/other_repo/json-pushes?full=1&fromchange=123456'
     poller = hgpoller.BaseHgPoller(
         hgURL='https://hg.mozilla.org',
         branch='mozilla-central',
         pushlogUrlOverride=
         'https://hg.mozilla.org/other_repo/json-pushes?full=1')
     poller.lastChangeset = '123456'
     url = poller._make_url()
     self.failUnlessEqual(url, correctUrl)
예제 #5
0
 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 = hgpoller.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)
예제 #6
0
 def testSimpleUrl(self):
     correctUrl = 'https://hg.mozilla.org/mozilla-central/json-pushes?version=2&full=1'
     poller = hgpoller.BaseHgPoller(
         hgURL='https://hg.mozilla.org', branch='mozilla-central')
     url = poller._make_url()
     self.failUnlessEqual(url, correctUrl)