From 835d9f05dd959ddd85e2bd229ef41b1a5372ded8 Mon Sep 17 00:00:00 2001 From: Stefan Garlonta Date: Sat, 30 Dec 2023 13:14:16 +0100 Subject: [PATCH] :white_check_mark: Fix code smell in test --- tests/test_csv_loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_csv_loader.py b/tests/test_csv_loader.py index 0f11ed6..ebdd5fb 100644 --- a/tests/test_csv_loader.py +++ b/tests/test_csv_loader.py @@ -32,7 +32,7 @@ def test_csv_loader_with_casting_disabled(self): with (patch(OPEN, mock_open(read_data=file_content)), patch(PATH_EXISTS, return_value=True), patch(PATH_ISFILE, return_value=True)): - data = csv('path/to/data.csv', cast_types=False) + data = csv(file_path, cast_types=False) self.assertEqual(len(data), 2) self.assertEqual(data[0].attr1, '1') self.assertIsInstance(data[0].attr1, str) @@ -52,7 +52,7 @@ def test_csv_loader_with_custom_delimiter(self): with (patch(OPEN, mock_open(read_data=file_content.replace(",", ";"))), patch(PATH_EXISTS, return_value=True), patch(PATH_ISFILE, return_value=True)): - data = csv('path/to/data.csv', delimiter=';') + data = csv(file_path, delimiter=';') self.assertEqual(len(data), 2) self.assertEqual(data[0].attr1, 1) self.assertIsInstance(data[0].attr1, int)