0001-tests-code-style-50260.patch
tests/test_soap.py | ||
---|---|---|
1 |
# Copyright (C) 2021 Entr'ouvert |
|
2 |
# |
|
3 |
# This program is free software: you can redistribute it and/or modify it |
|
4 |
# under the terms of the GNU Affero General Public License as published |
|
5 |
# by the Free Software Foundation, either version 3 of the License, or |
|
6 |
# (at your option) any later version. |
|
7 |
# |
|
8 |
# This program is distributed in the hope that it will be useful, |
|
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 |
# GNU Affero General Public License for more details. |
|
12 |
# |
|
13 |
# You should have received a copy of the GNU Affero General Public License |
|
14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | ||
1 | 16 |
from django.utils.encoding import force_bytes |
2 | 17 |
import pytest |
3 | 18 |
import mock |
... | ... | |
36 | 51 |
assert client.transport.cache |
37 | 52 |
assert client.plugins == plugins |
38 | 53 | |
54 | ||
39 | 55 |
@mock.patch('requests.sessions.Session.post') |
40 | 56 |
def test_disable_strict_mode(mocked_post): |
41 | 57 |
response = requests.Response() |
... | ... | |
60 | 76 |
client = SOAPClient(soap_resource, settings=Settings(strict=False)) |
61 | 77 |
result = client.service.GetLastTradePrice(tickerSymbol='banana') |
62 | 78 |
assert len(result) == 2 |
63 |
assert result['skipMe'] == None
|
|
79 |
assert result['skipMe'] is None
|
|
64 | 80 |
assert result['price'] == 4.2 |
65 |
- |