Skip to content
This repository
Browse code

added simple test for issue #19

  • Loading branch information...
commit 495b0e0abc5ab0d6604b7f9cabfb41d22501e58c 1 parent e08356d
Sergio Fernández authored January 12, 2014

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  test/wrapper_test.py
7  test/wrapper_test.py
@@ -167,6 +167,13 @@ def testSetQuery(self):
167 167
         self.wrapper.setQuery('UNKNOWN {e:a e:b e:c}')
168 168
         self.assertEqual(SELECT, self.wrapper.queryType, 'unknown queries result in SELECT')
169 169
 
  170
+    def testSetTimeout(self):
  171
+        self.wrapper.setTimeout(10)
  172
+        self.assertEqual(10, self.wrapper.timeout)
  173
+
  174
+        self.wrapper.resetQuery()
  175
+        self.assertEqual(None, self.wrapper.timeout)
  176
+
170 177
     def testClearParameter(self):
171 178
         self.wrapper.addParameter('param1', 'value1')
172 179
         self.wrapper.addParameter('param1', 'value2')

1 note on commit 495b0e0

Alexey Zakhlestin

@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.
Something went wrong with that request. Please try again.