Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
a_bondar committed Apr 23, 2024
1 parent b945a15 commit 2c51ca6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_bulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ async def test_bulk_create_mix_specified(self):
+ [UniqueName() for _ in range(1000)]
)

all_ = await UniqueName.all().values("id", "name")
all_ = await UniqueName.all().order_by("id").values("id", "name")
self.assertEqual(len(all_), 2000)

self.assertListSortEqual(
all_[:1000], [{"id": id_, "name": None} for id_ in range(10000, 11000)], sorted_key="id"
all_[1000:], [{"id": id_, "name": None} for id_ in range(10000, 11000)], sorted_key="id"
)
inc = all_[1000]["id"]
inc = all_[0]["id"]
self.assertListSortEqual(
all_[1000:], [{"id": val + inc, "name": None} for val in range(1000)], sorted_key="id"
all_[:1000], [{"id": val + inc, "name": None} for val in range(1000)], sorted_key="id"
)

async def test_bulk_create_uuidpk(self):
Expand Down

0 comments on commit 2c51ca6

Please sign in to comment.