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 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)
Esempio n. 3
0
 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))
Esempio n. 4
0
 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)
Esempio n. 6
0
 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)
Esempio n. 7
0
 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)
Esempio n. 8
0
 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)