<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-keystoneclient.git/keystoneclient/tests/unit/test_session.py, branch stable/xena</title>
<subtitle>opendev.org: openstack/python-keystoneclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/'/>
<entry>
<title>Use unittest.mock instead of third party mock</title>
<updated>2020-04-18T16:58:31+00:00</updated>
<author>
<name>Sean McGinnis</name>
<email>sean.mcginnis@gmail.com</email>
</author>
<published>2020-04-18T16:58:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=ee55c043c26a3e135e898792fb051a64d960559b'/>
<id>ee55c043c26a3e135e898792fb051a64d960559b</id>
<content type='text'>
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I7498ea2353cccca7b23d9ef74015a566ac431f90
Signed-off-by: Sean McGinnis &lt;sean.mcginnis@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I7498ea2353cccca7b23d9ef74015a566ac431f90
Signed-off-by: Sean McGinnis &lt;sean.mcginnis@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unit tests broken by requests-mock</title>
<updated>2019-09-06T10:08:39+00:00</updated>
<author>
<name>Takashi Kajinami</name>
<email>tkajinam@redhat.com</email>
</author>
<published>2019-09-06T06:03:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=27d4376ea57be9944ee5eb0601157f8996de077f'/>
<id>27d4376ea57be9944ee5eb0601157f8996de077f</id>
<content type='text'>
Now requests-mock records request url in log[1], so it is
invalid to check that the logger output does NOT contain
request url.

Also, fix url passed to request mock as now it requires
complete url is passed

[1] https://github.com/jamielennox/requests-mock/pull/93

Change-Id: I4bab30a6705b7cab6b5a569dd61c442263e39995
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now requests-mock records request url in log[1], so it is
invalid to check that the logger output does NOT contain
request url.

Also, fix url passed to request mock as now it requires
complete url is passed

[1] https://github.com/jamielennox/requests-mock/pull/93

Change-Id: I4bab30a6705b7cab6b5a569dd61c442263e39995
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix python3 test compat</title>
<updated>2018-06-10T18:36:50+00:00</updated>
<author>
<name>Morgan Fainberg</name>
<email>morgan.fainberg@gmail.com</email>
</author>
<published>2018-06-08T16:12:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=f2d3fec9b254f9c47e97ddf48e3c5f7614b87f1b'/>
<id>f2d3fec9b254f9c47e97ddf48e3c5f7614b87f1b</id>
<content type='text'>
Python3 test requirement means that the unicode type does not exist
instead we use six.unicode to get `unicode` in py27 and `str` in
python3.

Change-Id: I2cbf2e63a9d93c232b6928acf002a45b7fbcec8e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python3 test requirement means that the unicode type does not exist
instead we use six.unicode to get `unicode` in py27 and `str` in
python3.

Change-Id: I2cbf2e63a9d93c232b6928acf002a45b7fbcec8e
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace six.iteritems() with .items()</title>
<updated>2017-04-03T12:50:52+00:00</updated>
<author>
<name>M V P Nitesh</name>
<email>m.nitesh@nectechnologies.in</email>
</author>
<published>2017-04-03T12:50:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=46b9e429a2cbfcd1d898616c177538a9283997d3'/>
<id>46b9e429a2cbfcd1d898616c177538a9283997d3</id>
<content type='text'>
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I18a6890935ebdbb589269379f21a0dd47d07eb3a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I18a6890935ebdbb589269379f21a0dd47d07eb3a
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix response body being omitted in debug mode incorrectly</title>
<updated>2017-01-17T13:05:52+00:00</updated>
<author>
<name>Tin Lam</name>
<email>tinlam@gmail.com</email>
</author>
<published>2017-01-17T05:14:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=dcb719d0e51afa0253c144136b41f0e390c48c4c'/>
<id>dcb719d0e51afa0253c144136b41f0e390c48c4c</id>
<content type='text'>
In debug mode, when a response's header Content-Type is set
to "application/json" with a parameter, i.e.,
"application/json; charset=UTF-8".  This patch set ignores
the additional parameter and only match the mimetype.

Change-Id: Ie8fcb1061e0e49b039436947524cfdc704c83846
Closes-Bug: #1656981
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In debug mode, when a response's header Content-Type is set
to "application/json" with a parameter, i.e.,
"application/json; charset=UTF-8".  This patch set ignores
the additional parameter and only match the mimetype.

Change-Id: Ie8fcb1061e0e49b039436947524cfdc704c83846
Closes-Bug: #1656981
</pre>
</div>
</content>
</entry>
<entry>
<title>Only log application/json in session to start</title>
<updated>2017-01-11T03:35:14+00:00</updated>
<author>
<name>Steve Martinelli</name>
<email>s.martinelli@gmail.com</email>
</author>
<published>2017-01-11T02:58:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=51d16fa344829aadf454faf5e0c4535a8f96a7c8'/>
<id>51d16fa344829aadf454faf5e0c4535a8f96a7c8</id>
<content type='text'>
When whitelisting content types to debug print from session we chose
application/json and application/text. application/text is not a real
mime type, text is typically text/plain.

Rather than guess at mime types only print application/json to start
with, but make it easy for additional types to be added later.

Adapted from keystoneauth: Ica5fee076cdab8b1d5167161d28af7313fad9477
Related-Bug: 1616105

Change-Id: Ieaa8fb3ea8d25e09b89498f23b70b18c0f6153f1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When whitelisting content types to debug print from session we chose
application/json and application/text. application/text is not a real
mime type, text is typically text/plain.

Rather than guess at mime types only print application/json to start
with, but make it easy for additional types to be added later.

Adapted from keystoneauth: Ica5fee076cdab8b1d5167161d28af7313fad9477
Related-Bug: 1616105

Change-Id: Ieaa8fb3ea8d25e09b89498f23b70b18c0f6153f1
</pre>
</div>
</content>
</entry>
<entry>
<title>X-Serivce-Token should be hashed in the log</title>
<updated>2017-01-09T16:31:35+00:00</updated>
<author>
<name>Tin Lam</name>
<email>tinlam@gmail.com</email>
</author>
<published>2017-01-09T16:31:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=56af8c90ecbb3cb5d29036151108b1e4e7a69bcc'/>
<id>56af8c90ecbb3cb5d29036151108b1e4e7a69bcc</id>
<content type='text'>
Currently, logs display the hash values of X-Auth-Token,
Authorization, and X-Subject-Token, but not the value of
the X-Service-Token.  This patch set adds the X-Service-Token
to the list of header fields to be hashed for logging purposes.

Change-Id: Iaa3a27f4b6c3baf964fa0c71328ffe9df43b2c0a
Closes-Bug: #1654847
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, logs display the hash values of X-Auth-Token,
Authorization, and X-Subject-Token, but not the value of
the X-Service-Token.  This patch set adds the X-Service-Token
to the list of header fields to be hashed for logging purposes.

Change-Id: Iaa3a27f4b6c3baf964fa0c71328ffe9df43b2c0a
Closes-Bug: #1654847
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "Do not log binary data during request"</title>
<updated>2017-01-08T04:45:57+00:00</updated>
<author>
<name>Jenkins</name>
<email>jenkins@review.openstack.org</email>
</author>
<published>2017-01-08T04:45:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=1112abe54b126d390fc3600e07b813dfee3a736a'/>
<id>1112abe54b126d390fc3600e07b813dfee3a736a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not log binary data during request</title>
<updated>2017-01-06T23:31:53+00:00</updated>
<author>
<name>Steve Martinelli</name>
<email>s.martinelli@gmail.com</email>
</author>
<published>2017-01-03T14:55:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=af770f17b705a66bd4292b2a54df46ec5fdaa12b'/>
<id>af770f17b705a66bd4292b2a54df46ec5fdaa12b</id>
<content type='text'>
Do not log binary data during debug logging of a session.
Replace the binary data with the string &lt;binary_data&gt; instead.

sort of a backport of: I5184002f3a21c5e0ee510b21b9a7884c8dccd1e3

Change-Id: I07ddbc3967f297597542f1975004d94c490f6e6b
Related-Bug: 1616105
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not log binary data during debug logging of a session.
Replace the binary data with the string &lt;binary_data&gt; instead.

sort of a backport of: I5184002f3a21c5e0ee510b21b9a7884c8dccd1e3

Change-Id: I07ddbc3967f297597542f1975004d94c490f6e6b
Related-Bug: 1616105
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent MemoryError when logging response bodies</title>
<updated>2017-01-05T13:19:25+00:00</updated>
<author>
<name>Tobias Diaz</name>
<email>tobias.deb@gmail.com</email>
</author>
<published>2016-08-23T15:13:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-keystoneclient.git/commit/?id=3e56e0d7e5e1a76d806a3bc1f6d5ef9070f95771'/>
<id>3e56e0d7e5e1a76d806a3bc1f6d5ef9070f95771</id>
<content type='text'>
Response bodies are loaded into memory prior to
being logged.

Loading huge response bodies may result in a
MemoryError.

This patch proposes that only JSON and TEXT
responses be logged, i.e when the Content-Type
header is application/json or application/text.

Responses that do not include or have a different
Content-Type header will have their body omitted.

This is a sort of backport of the fix for
keystoneauth sessions, see
I93b6fff73368c4f58bdebf8566c4948b50980cee

Co-Authored-By: Samuel de Medeiros Queiroz &lt;samueldmq@gmail.com&gt;

Closes-bug: 1616105

Change-Id: I8f43eee3a0b35041c6cf672e476f8151cf2f8d14
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Response bodies are loaded into memory prior to
being logged.

Loading huge response bodies may result in a
MemoryError.

This patch proposes that only JSON and TEXT
responses be logged, i.e when the Content-Type
header is application/json or application/text.

Responses that do not include or have a different
Content-Type header will have their body omitted.

This is a sort of backport of the fix for
keystoneauth sessions, see
I93b6fff73368c4f58bdebf8566c4948b50980cee

Co-Authored-By: Samuel de Medeiros Queiroz &lt;samueldmq@gmail.com&gt;

Closes-bug: 1616105

Change-Id: I8f43eee3a0b35041c6cf672e476f8151cf2f8d14
</pre>
</div>
</content>
</entry>
</feed>
