We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ba5ab6 commit 771a0bdCopy full SHA for 771a0bd
.gitignore
@@ -6,3 +6,4 @@
6
/MANIFEST
7
*.snap
8
sophia
9
+*.egg-info
tarantool/connection.py
@@ -208,7 +208,7 @@ def check(): # Check that connection is alive
208
209
last_errno = check()
210
if self.connected and last_errno == errno.EAGAIN:
211
- return
+ return
212
213
attempt = 0
214
last_errno = 0
@@ -352,6 +352,8 @@ def update(self, space_name, key, op_list, **kwargs):
352
353
:param space_name: space number or name to update a record
354
:type space_name: int or str
355
+ :param index: index number or name to update a record
356
+ :type index: int or str
357
:param key: key that identifies a record
358
:type key: int or str
359
:param op_list: list of operations. Each operation
@@ -361,7 +363,7 @@ def update(self, space_name, key, op_list, **kwargs):
361
363
362
364
:rtype: `Response` instance
365
'''
- index = kwargs.get("index", 0)
366
+ index_name = kwargs.get("index", 0)
367
368
key = check_key(key)
369
if isinstance(space_name, basestring):
tests/suites/test_dml.py
@@ -116,7 +116,18 @@ def test_05_ping(self):
116
self.assertEqual(self.con.ping(notime=True), "Success")
117
118
def test_06_update(self):
119
- pass
+ self.assertEqual(self.con.update('space_1', (2,), [('+', 1, 3)]),
120
+ [(2, 5, 'tuple_3')])
121
+ self.assertEqual(self.con.update('space_1', (2,), [('-', 1, 3)]),
122
+ [(2, 2, 'tuple_3')])
123
+ self.assertEqual(self.con.update('space_1', (2,), [(':', 2, 3, 2, 'lalal')]),
124
+ [(2, 2, 'tuplalal_3')])
125
+ self.assertEqual(self.con.update('space_1', (2,), [('!', 2, '1')]),
126
+ [(2, 2, '1', 'tuplalal_3')])
127
+ self.assertEqual(self.con.update('space_1', (2,), [('!', 2, 'oingo, boingo')]),
128
+ [(2, 2, 'oingo, boingo', '1', 'tuplalal_3')])
129
+ self.assertEqual(self.con.update('space_1', (2,), [('#', 2, 2)]),
130
131
132
def test_07_call(self):
133
self.assertEqual(self.con.call('json.decode', '[123, 234, 345]'), [(123, 234, 345)])
0 commit comments