Esempio n. 1
0
 def test_disable_custom_workspace(self):
     sample_xml = """
     <project>
       <actions/>
       <description/>
       <keepDependencies>false</keepDependencies>
       <properties/>
       <scm class="hudson.scm.NullSCM"/>
       <canRoam>true</canRoam>
       <disabled>false</disabled>
       <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
       <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
       <triggers class="vector"/>
       <concurrentBuild>false</concurrentBuild>
       <customWorkspace>my/test/workspace</customWorkspace>
       <builders/>
       <publishers/>
       <buildWrappers/>
     </project>"""
     
     j = JobXML(sample_xml)
     j.disable_custom_workspace()
     actual_xml = j.XML
     
     self.assertTrue("<customWorkspace>" not in actual_xml)
Esempio n. 2
0
 def test_disable_empty_custom_workspace(self):
     # our sample config does not have a custom workspace
     j = JobXML(self.__test_config)
     # make sure disabling custom workspace when none exists doesn't fail
     j.disable_custom_workspace()
     
     actual_xml = j.XML
     
     self.assertTrue("<customWorkspace>" not in actual_xml)