summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalim Fadhley <sal@stodge.org>2014-08-03 23:02:25 +0100
committerSalim Fadhley <sal@stodge.org>2014-08-03 23:02:25 +0100
commit76d50fd54072f7e68fa1a4f14a246a061891145a (patch)
tree8408c750f110b5ce20903d38e1291a38e2f692ed
parente89569fc2c611984fd3534af5cded526dbd876fc (diff)
downloadpython-jenkinsapi-76d50fd54072f7e68fa1a4f14a246a061891145a.tar.gz
python-jenkinsapi-76d50fd54072f7e68fa1a4f14a246a061891145a.tar.bz2
python-jenkinsapi-76d50fd54072f7e68fa1a4f14a246a061891145a.zip
Tiny fixes.
-rw-r--r--jenkinsapi/job.py28
-rw-r--r--jenkinsapi_tests/unittests/test_job.py2
2 files changed, 16 insertions, 14 deletions
diff --git a/jenkinsapi/job.py b/jenkinsapi/job.py
index eada1fc..a0c1e06 100644
--- a/jenkinsapi/job.py
+++ b/jenkinsapi/job.py
@@ -2,21 +2,8 @@
Module for jenkinsapi Job
"""
-import json
-import logging
-
-try:
- import urlparse
-except ImportError:
- # Python3
- import urllib.parse as urlparse
-
-import xml.etree.ElementTree as ET
from collections import defaultdict
from jenkinsapi.build import Build
-from jenkinsapi.queue import QueueItem
-from jenkinsapi.jenkinsbase import JenkinsBase
-from jenkinsapi.mutable_jenkins_thing import MutableJenkinsThing
from jenkinsapi.custom_exceptions import (
NoBuildData,
NotConfiguredSCM,
@@ -26,6 +13,21 @@ from jenkinsapi.custom_exceptions import (
UnknownQueueItem,
BadParams,
)
+from jenkinsapi.jenkinsbase import JenkinsBase
+from jenkinsapi.mutable_jenkins_thing import MutableJenkinsThing
+from jenkinsapi.queue import QueueItem
+import json
+import logging
+
+import xml.etree.ElementTree as ET
+
+
+try:
+ import urlparse
+except ImportError:
+ # Python3
+ import urllib.parse as urlparse
+
SVN_URL = './scm/locations/hudson.scm.SubversionSCM_-ModuleLocation/remote'
GIT_URL = './scm/userRemoteConfigs/hudson.plugins.git.UserRemoteConfig/url'
diff --git a/jenkinsapi_tests/unittests/test_job.py b/jenkinsapi_tests/unittests/test_job.py
index ab0a411..aaa29d4 100644
--- a/jenkinsapi_tests/unittests/test_job.py
+++ b/jenkinsapi_tests/unittests/test_job.py
@@ -122,7 +122,7 @@ class TestJob(unittest.TestCase):
self.assertEquals(self.j.get_description(), 'test job')
def test_get_build_triggerurl(self):
- self.assertEquals(self.j.get_build_triggerurl(),
+ self.assertEquals(self.j.get_build_triggerurl(None),
'http://halob:8080/job/foo/buildWithParameters')
def test_wrong__mk_json_from_build_parameters(self):