From d914ae25e503e3e028c0441074b32e0c50c48dba Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 09:52:13 +0000 Subject: [PATCH] Format code with black and isort --- tests/unit/insights/test_importer.py | 57 ++++++++++++---------------- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/tests/unit/insights/test_importer.py b/tests/unit/insights/test_importer.py index faab6d0a87..ddc2f940cf 100644 --- a/tests/unit/insights/test_importer.py +++ b/tests/unit/insights/test_importer.py @@ -504,15 +504,12 @@ def test_generate_insights_no_predictions(self, mocker): get_existing_insight_mock = mocker.patch( "robotoff.insights.importer.get_existing_insight", return_value=[] ) - assert ( - CategoryImporter.generate_insights( - DEFAULT_BARCODE, - [], - DEFAULT_SERVER_DOMAIN, - product_store=FakeProductStore(), - ) - == ([], [], []) - ) + assert CategoryImporter.generate_insights( + DEFAULT_BARCODE, + [], + DEFAULT_SERVER_DOMAIN, + product_store=FakeProductStore(), + ) == ([], [], []) get_existing_insight_mock.assert_called_once() def test_generate_insights_no_predictions_with_existing_insight(self, mocker): @@ -525,36 +522,30 @@ def test_generate_insights_no_predictions_with_existing_insight(self, mocker): "robotoff.insights.importer.get_existing_insight", return_value=[existing_insight], ) - assert ( - CategoryImporter.generate_insights( - DEFAULT_BARCODE, - [], - DEFAULT_SERVER_DOMAIN, - product_store=FakeProductStore(), - ) - == ([], [], [existing_insight]) - ) + assert CategoryImporter.generate_insights( + DEFAULT_BARCODE, + [], + DEFAULT_SERVER_DOMAIN, + product_store=FakeProductStore(), + ) == ([], [], [existing_insight]) get_existing_insight_mock.assert_called_once() def test_generate_insights_missing_product_no_references(self, mocker): get_existing_insight_mock = mocker.patch( "robotoff.insights.importer.get_existing_insight", return_value=[] ) - assert ( - InsightImporter.generate_insights( - DEFAULT_BARCODE, - [ - Prediction( - type=PredictionType.category, - barcode=DEFAULT_BARCODE, - data={}, - ) - ], - DEFAULT_SERVER_DOMAIN, - product_store=FakeProductStore(), - ) - == ([], [], []) - ) + assert InsightImporter.generate_insights( + DEFAULT_BARCODE, + [ + Prediction( + type=PredictionType.category, + barcode=DEFAULT_BARCODE, + data={}, + ) + ], + DEFAULT_SERVER_DOMAIN, + product_store=FakeProductStore(), + ) == ([], [], []) get_existing_insight_mock.assert_called_once() def test_generate_insights_missing_product_with_reference(self, mocker):