Пример #1
0
 def test_from_currnt_build_env(self, monkeypatch):
     monkeypatch.setenv('JENKINS_URL', 'http://jenkins.example.com')
     monkeypatch.setenv('JOB_BASE_NAME', 'j1')
     monkeypatch.setenv('JOB_URL', 'http://jenkins.example.com/job/j1')
     monkeypatch.setenv('BUILD_ID', '7')
     monkeypatch.setenv('BUILD_URL', 'http://jenkins.example.com/job/j1/7')
     bl = BuildsList.from_currnt_build_env()
     bp = BuildPtr.from_currnt_build_env()
     assert len(bl) == 1
     assert id(bl[0]) != id(bp)
     assert bl[0] == bp
Пример #2
0
 def test_from_currnt_build_env(self, monkeypatch):
     monkeypatch.setenv('JENKINS_URL', 'http://jenkins.example.com')
     monkeypatch.setenv('JOB_BASE_NAME', 'j1')
     monkeypatch.setenv('JOB_URL', 'http://jenkins.example.com/job/j1')
     monkeypatch.setenv('BUILD_ID', '7')
     monkeypatch.setenv('BUILD_URL', 'http://jenkins.example.com/job/j1/7')
     bl = BuildsList.from_currnt_build_env()
     bp = BuildPtr.from_currnt_build_env()
     assert len(bl) == 1
     assert id(bl[0]) != id(bp)
     assert bl[0] == bp
Пример #3
0
 def set_current_build_from_env(self):
     self.builds = BuildsList.from_currnt_build_env()
Пример #4
0
 def set_current_build_from_env(self):
     self.builds = BuildsList.from_currnt_build_env()