From c112c8f014dd8bc0021c9a7292540a2c67935b72 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 29 Jan 2021 16:01:47 +0100 Subject: [PATCH 1/2] tests: code style (#50260) --- tests/test_soap.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/test_soap.py b/tests/test_soap.py index c330a98c..72907eab 100644 --- a/tests/test_soap.py +++ b/tests/test_soap.py @@ -1,3 +1,18 @@ +# Copyright (C) 2021 Entr'ouvert +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + from django.utils.encoding import force_bytes import pytest import mock @@ -36,6 +51,7 @@ def test_soap_client(): assert client.transport.cache assert client.plugins == plugins + @mock.patch('requests.sessions.Session.post') def test_disable_strict_mode(mocked_post): response = requests.Response() @@ -60,5 +76,5 @@ def test_disable_strict_mode(mocked_post): client = SOAPClient(soap_resource, settings=Settings(strict=False)) result = client.service.GetLastTradePrice(tickerSymbol='banana') assert len(result) == 2 - assert result['skipMe'] == None + assert result['skipMe'] is None assert result['price'] == 4.2 -- 2.29.2