From 1036f365fa2d2152f5da8a449aa2005ddb780e04 Mon Sep 17 00:00:00 2001 From: Imdad Ahad Date: Fri, 6 Jan 2017 17:43:46 +0000 Subject: [PATCH] Refactor generate csv test to expect a stream (generator) --- tests/app/test_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/app/test_utils.py b/tests/app/test_utils.py index 201726206..bd404f6eb 100644 --- a/tests/app/test_utils.py +++ b/tests/app/test_utils.py @@ -56,8 +56,7 @@ def test_generate_csv_from_notifications( set_status=status )['notifications'] ) - - for row in DictReader(StringIO(csv_content)): + for row in DictReader(StringIO(next(csv_content))): assert row['Time'] == 'Friday 01 January 2016 at 15:09' assert row['Status'] == expected_status