stubbing out a new invocation test
authorsalimfadhley <sal@stodge.org>
Sun, 23 Jun 2013 08:09:35 +0000 (09:09 +0100)
committerSalim Fadhley <sal@stodge.org>
Sun, 23 Jun 2013 20:21:53 +0000 (21:21 +0100)
jenkinsapi_tests/systests/job_configs.py [new file with mode: 0644]
jenkinsapi_tests/systests/test_invocation.py [new file with mode: 0644]

diff --git a/jenkinsapi_tests/systests/job_configs.py b/jenkinsapi_tests/systests/job_configs.py
new file mode 100644 (file)
index 0000000..f4ff6f3
--- /dev/null
@@ -0,0 +1,22 @@
+LONG_RUNNING_JOB = JOB_XML = """
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+  <actions/>
+  <description></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>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>ping -c 200 localhost</command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>""".strip()
diff --git a/jenkinsapi_tests/systests/test_invocation.py b/jenkinsapi_tests/systests/test_invocation.py
new file mode 100644 (file)
index 0000000..f79b9f6
--- /dev/null
@@ -0,0 +1,22 @@
+'''
+System tests for `jenkinsapi.jenkins` module.
+'''
+import unittest
+from jenkinsapi.invocation import Invocation
+from jenkinsapi_tests.test_utils.random_strings import random_string
+from jenkinsapi_tests.systests.base import BaseSystemTest, EMPTY_JOB_CONFIG
+
+
+class TestInvocation(BaseSystemTest):
+
+    def test_invocation_object(self):
+        job_name = 'create_%s' % random_string()
+        job = self.jenkins.create_job(job_name, EMPTY_JOB_CONFIG)
+        ii = job.invoke()
+        self.assertIsInstance(ii, Invocation)
+
+
+
+
+if __name__ == '__main__':
+    unittest.main()