def test_format_string(self):
     url = _ComputeRepositoryURL(FakeStep(), "http://server/%s")
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "http://server/test")
     return d
 def test_backward_compatibility_render(self):
     url = _ComputeRepositoryURL(FakeStep(), WithProperties("repourl%(foo)s"))
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "repourlbar")
     return d
 def test_format_string(self):
     url = _ComputeRepositoryURL("http://server/%s")
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "http://server/test")
     return d
 def test_backward_compatibility_render(self):
     url = _ComputeRepositoryURL(WithProperties("repourl%(foo)s"))
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "repourlbar")
     return d
 def test_backward_compatibility(self):
     url = _ComputeRepositoryURL(FakeStep(), "repourl")
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "repourl")
     return d
 def test_backward_compatibility(self):
     url = _ComputeRepositoryURL("repourl")
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "repourl")
     return d
 def test_callable_render(self):
     func = lambda x: WithProperties(x+"%(foo)s")
     url = _ComputeRepositoryURL(FakeStep(), func)
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "testbar")
     return d
 def test_callable_render(self):
     func = lambda x: WithProperties(x+"%(foo)s")
     url = _ComputeRepositoryURL(func)
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "testbar")
     return d
 def test_dict_render(self):
     d = dict(test=WithProperties("repourl%(foo)s"))
     url = _ComputeRepositoryURL(FakeStep(), d)
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "repourlbar")
     return d
 def test_dict_render(self):
     d = dict(test=WithProperties("repourl%(foo)s"))
     url = _ComputeRepositoryURL(d)
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "repourlbar")
     return d
 def test_callable(self):
     func = lambda x: x[::-1]
     url = _ComputeRepositoryURL(func)
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "tset")
     return d
 def test_callable(self):
     func = lambda x: x[::-1]
     url = _ComputeRepositoryURL(FakeStep(), func)
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "tset")
     return d
 def test_dict(self):
     dict = {}
     dict['test'] = "ssh://server/testrepository"
     url = _ComputeRepositoryURL(FakeStep(), dict)
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "ssh://server/testrepository")
     return d
 def test_dict(self):
     dict = {}
     dict['test'] = "ssh://server/testrepository"
     url = _ComputeRepositoryURL(dict)
     d = self.build.render(url)
     @d.addCallback
     def callback(res):
         self.assertEquals(res, "ssh://server/testrepository")
     return d
 def test_backward_compatibility(self):
     url = _ComputeRepositoryURL("repourl")
     self.assertEqual(self.build.render(url), "repourl")
Exemple #16
0
 def test_dict(self):
     dict = {}
     dict['test'] = "ssh://server/testrepository"
     url = _ComputeRepositoryURL(dict)
     self.assertEquals(self.build.render(url),
                       "ssh://server/testrepository")
Exemple #17
0
 def test_dict_render(self):
     d = dict(test=WithProperties("repourl%(foo)s"))
     url = _ComputeRepositoryURL(d)
     self.assertEquals(self.build.render(url), "repourlbar")
 def test_callable(self):
     func = lambda x: x[::-1]
     url = _ComputeRepositoryURL(func)
     self.assertEquals(self.build.render(url), "tset")
Exemple #19
0
 def test_format_string(self):
     url = _ComputeRepositoryURL("http://server/%s")
     self.assertEquals(self.build.render(url), "http://server/test")
 def test_dict_render(self):
     d = dict(test=WithProperties("repourl%(foo)s"))
     url = _ComputeRepositoryURL(d)
     self.assertEquals(self.build.render(url), "repourlbar")
Exemple #21
0
 def test_backward_compatibility_render(self):
     url = _ComputeRepositoryURL(WithProperties("repourl%(foo)s"))
     self.assertEquals(self.build.render(url), "repourlbar")
 def test_format_string(self):
     url = _ComputeRepositoryURL("http://server/%s")
     self.assertEquals(self.build.render(url), "http://server/test")
 def test_dict(self):
     dict = {}
     dict['test'] = "ssh://server/testrepository"
     url = _ComputeRepositoryURL(dict)
     self.assertEquals(self.build.render(url), "ssh://server/testrepository")
Exemple #24
0
 def test_callable(self):
     func = lambda x: x[::-1]
     url = _ComputeRepositoryURL(func)
     self.assertEquals(self.build.render(url), "tset")
 def test_backward_compatibility_render(self):
     url = _ComputeRepositoryURL(WithProperties("repourl%(foo)s"))
     self.assertEquals(self.build.render(url), "repourlbar")
Exemple #26
0
 def test_callable_render(self):
     func = lambda x: WithProperties(x + "%(foo)s")
     url = _ComputeRepositoryURL(func)
     self.assertEquals(self.build.render(url), "testbar")
 def test_callable_render(self):
     func = lambda x: WithProperties(x+"%(foo)s")
     url = _ComputeRepositoryURL(func)
     self.assertEquals(self.build.render(url), "testbar")
Exemple #28
0
 def test_backward_compatibility(self):
     url = _ComputeRepositoryURL("repourl")
     self.assertEqual(self.build.render(url), "repourl")