mirror of
https://github.com/enpaul/peewee-plus.git
synced 2024-11-14 18:46:47 +00:00
Update tests for calc batch size to accomodate new sqlite logic
This commit is contained in:
parent
0d1a142e43
commit
5df974faa5
@ -17,7 +17,11 @@ def test_sqlite(fakedb):
|
|||||||
|
|
||||||
data = peewee.IntegerField()
|
data = peewee.IntegerField()
|
||||||
|
|
||||||
models = [TestModel(item) for item in range(500)]
|
# Three is just chosen as an arbitrary multiplier to ensure the value is larger than the
|
||||||
|
# sqlite variable limit
|
||||||
|
models = [
|
||||||
|
TestModel(item) for item in range(peewee_plus.SQLITE_DEFAULT_VARIABLE_LIMIT * 3)
|
||||||
|
]
|
||||||
assert (
|
assert (
|
||||||
peewee_plus.calc_batch_size(models) <= peewee_plus.SQLITE_DEFAULT_VARIABLE_LIMIT
|
peewee_plus.calc_batch_size(models) <= peewee_plus.SQLITE_DEFAULT_VARIABLE_LIMIT
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user