From: salimfadhley Date: Mon, 17 Jun 2013 23:51:56 +0000 (+0100) Subject: fixed a typo in the unittst X-Git-Tag: v0.2.23~126^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63bf62a8412f167ea9b1ffd9e8d91c619813c839;p=tools%2Fpython-jenkinsapi.git fixed a typo in the unittst --- diff --git a/jenkinsapi_tests/unittests/test_node.py b/jenkinsapi_tests/unittests/test_node.py index e595838..daf947b 100644 --- a/jenkinsapi_tests/unittests/test_node.py +++ b/jenkinsapi_tests/unittests/test_node.py @@ -1,6 +1,5 @@ import mock import unittest -import datetime from jenkinsapi.node import Node @@ -47,10 +46,12 @@ class TestNode(unittest.TestCase): def testName(self): with self.assertRaises(AttributeError): self.n.id() + self.assertEquals(self.n.name, 'bobnit') - def test_online(self): - return assertEquals(self.n, True) - - + @mock.patch.object(Node, '_poll') + def test_online(self, _poll): + _poll.return_value = self.DATA + return self.assertEquals(self.n.is_online(), True) - self.assertEquals(self.n.name, 'bobnit') +if __name__ == '__main__': + unittest.main()