Skip to content

Commit

Permalink
add extras execute_batch
Browse files Browse the repository at this point in the history
  • Loading branch information
vir-mir committed Dec 6, 2019
1 parent 17b5e4c commit cb55c94
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ def test__paginate():
assert data[index] == list(val)


def test__paginate_even():
data = [
[1, 2, 3],
[4, 5, 6],
]
for index, val in enumerate(_paginate((1, 2, 3, 4, 5, 6), page_size=3)):
assert data[index] == list(val)


async def test_execute_batch(cursor):
args = [(1,), (2,), (3,), (4,)]
sql = 'insert into tbl_extras values(%s)'
Expand Down

0 comments on commit cb55c94

Please sign in to comment.