Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
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))
Ejemplo n.º 3
0
 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)
Ejemplo 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)
Ejemplo n.º 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 = 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)
Ejemplo 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)
Ejemplo n.º 7
0
 def __init__(self):
     BaseHgPoller.__init__(self, 'http://localhost', 'whatever',
                           repo_branch=repo_branch, maxChanges=maxChanges, mergePushChanges=mergePushChanges)
     self.emptyRepo = True
Ejemplo n.º 8
0
 def __init__(self):
     BaseHgPoller.__init__(self, 'http://localhost', 'whatever',
                           repo_branch=repo_branch)
     self.emptyRepo = True
Ejemplo n.º 9
0
 def __init__(self):
     BaseHgPoller.__init__(self, 'http://localhost', 'whatever',
             repo_branch=repo_branch, maxChanges=maxChanges)
     self.emptyRepo = True
Ejemplo n.º 10
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)
Ejemplo n.º 11
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)