Browse files

added simple test for issue #19

  • Loading branch information...
1 parent e08356d commit 495b0e0abc5ab0d6604b7f9cabfb41d22501e58c @wikier wikier committed Jan 12, 2014
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/
@@ -167,6 +167,13 @@ def testSetQuery(self):
self.wrapper.setQuery('UNKNOWN {e:a e:b e:c}')
self.assertEqual(SELECT, self.wrapper.queryType, 'unknown queries result in SELECT')
+ def testSetTimeout(self):
+ self.wrapper.setTimeout(10)
+ self.assertEqual(10, self.wrapper.timeout)
+ self.wrapper.resetQuery()
+ self.assertEqual(None, self.wrapper.timeout)
def testClearParameter(self):
self.wrapper.addParameter('param1', 'value1')
self.wrapper.addParameter('param1', 'value2')

1 comment on commit 495b0e0


indeyets commented on 495b0e0 Jan 15, 2014

@wikier checking of private field doesn't do much help (it does harm, actually, as we can not change implementation details without breaking tests).

test has to test, that this value is actually used during socket initialization (mock of socket object is needed)

Please sign in to comment.