From 6a0462755ad0e1d33a97821d8240c461a5c7b807 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Wed, 24 Aug 2016 12:23:21 -0500 Subject: [PATCH] Fix integration tests. Pep-8 line length --- tests/test_postfetch_lastrowid.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_postfetch_lastrowid.py b/tests/test_postfetch_lastrowid.py index 52e22eb..79da2a0 100644 --- a/tests/test_postfetch_lastrowid.py +++ b/tests/test_postfetch_lastrowid.py @@ -3,8 +3,7 @@ def test_postfetch_lastrowid(redshift_session): session = redshift_session - for i in range(5): - postfetchExample = models.PostfetchExample(some_int=i) - session.add(postfetchExample) + examples = [models.PostfetchExample(some_int=i) for i in range(5)] + session.add_all(examples) session.flush() - assert postfetchExample.id == 4 + assert sorted(pfe.id for pfe in examples) == [0, 1, 2, 3, 4]