From 5df974faa589c3cb99942a37c93f5d5f8615ff97 Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:47:31 -0400 Subject: [PATCH] Update tests for calc batch size to accomodate new sqlite logic --- tests/test_calc_batch_size.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_calc_batch_size.py b/tests/test_calc_batch_size.py index 11ec09b..1569933 100644 --- a/tests/test_calc_batch_size.py +++ b/tests/test_calc_batch_size.py @@ -17,7 +17,11 @@ def test_sqlite(fakedb): 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 ( peewee_plus.calc_batch_size(models) <= peewee_plus.SQLITE_DEFAULT_VARIABLE_LIMIT )