summaryrefslogtreecommitdiff
path: root/heatclient/tests/unit/test_common_http.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove sixTakashi Kajinami2022-05-091-5/+5
| | | | | | | This library no longer supports Python 2, thus usage of six can be removed. Change-Id: I8d0c1cfd6dff375b3b7756a5b36c95a2df3f04c6
* Use unittest.mock instead of third party mockjacky062020-05-061-1/+1
| | | | | | | 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: I5cf252c1a22977d3c87898e723e5001cc87a0d87
* Set Content-Type header explictly for SessionClientRabi Mishra2019-03-151-2/+6
| | | | | | | | | | SessionClient is subclassed from keystoneauth LegacyJsonAdapter. LegacyJsonAdapter does not set the Content-Type explicitly and results in decodeing issues in some cases. Change-Id: Idf23022b394607c332490331fc4b216de6ff1313 Story: 2005237 Task: 30027
* Decode content before checkingrabi2017-07-261-1/+1
| | | | | | | Decode before checking for py3 compatibility. Change-Id: Ic62ebc385146ab1406dd64384044d92be8171052 Related-Bug: #1695144
* Replace mox3 with mockshizhihui2016-11-131-382/+297
| | | | | | | | | In heatclient, some unit tests still use mox3, which will make the test speed much slow, so I decide to remove it. The modify file: heatclient/tests/unit/test_common_http.py Change-Id: I220fabedb8e9fcc8eeea9d5e98b3ddeed68f8a43 Implements: bp remove-mox3-in-heatclient
* Import mox in __init__.pyshizhihui2016-09-011-1/+1
| | | | | | | | | We can initialize the 'mox' of module mox3 in __init__.py, then in these files that have modified, we only have 'import mox' other than 'from mox3 import mox', which can make the code smaller and clear. Change-Id: Ic09597a7205eed47bd3cff03d1e7bc78744e52d4
* Standardize import formatshizhihui2016-08-031-1/+1
| | | | | | | According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format in heatclinet. Change-Id: I0200ddad88ee833d7de9d6df2c1519e4f4560db7
* Serialize files when using SessionClientrabi2016-06-081-1/+26
| | | | | | | | SessionClient can not json serialize TemplateFiles object. We should do them explictly. Change-Id: Ia67562ae9a13c0975cb5c39532c0dc413d82c4c3 Closes-Bug: #1589519
* Merge "Allow redirects to use location from response"Jenkins2016-05-201-18/+1
|\
| * Allow redirects to use location from responserabi2016-05-171-18/+1
| | | | | | | | | | | | | | | | | | This allows redirects to use fully qualified location from response header and removes the check to prohibit redirects to different project(required for super admin actions). Change-Id: I46876189e96375922c4f0bf30452b7c4980fe39c
* | switch to keystoneauthSteve Martinelli2016-05-181-3/+2
|/ | | | | | | | | move heatclient to keystoneauth as keystoneclient's auth session, plugins and adapter code has been deprecated [1]. [1] http://docs.openstack.org/releasenotes/python-keystoneclient/mitaka.html#deprecation-notes Change-Id: Iedd7ceb97d39ab3ecccf8786aad8b5f45d15175e
* Merge "Fill status code for every HTTPException"Jenkins2016-03-141-0/+16
|\
| * Fill status code for every HTTPExceptionBartlomiej Biernacki2015-11-121-0/+16
| | | | | | | | | | Change-Id: Ib73398f0a555c9ac4534fd3ce4a1c06e51bc5962 Closes-Bug: #1515519
* | Fix error message on authentication failureneetu2016-01-061-1/+1
|/ | | | | | | Removing the "please try again" part of the error message on authentication failure. Change-Id: I5b7424915d7a62e08b4e6cb1cd89c7b304afa24b closes-Bug: #1526944
* Fix TypeError when call keystoneclient session.request()huangtianhua2015-07-061-8/+24
| | | | | | | | | | | | | | A TypeError raised when run cmd 'heat resource-show': TypeError: request() got an unexpected keyword argument 'follow_redirects' This problem was introduced by the change I90bc9d9fcd1058c3eca288f08dd134810f1b0000 to move SessionClient from HTTPClient to adapter, due there is no keyword argument 'follow_redirects' in keystoneclient session.request() method. Change-Id: I91f13da740bf1e66dffd68cdf666a24d68aa543d Closes-Bug: #1471650
* Add tests for SessionClientPeter Razumovsky2015-07-021-33/+172
| | | | | Change-Id: I22913a7277a8eacfe6bfdb947ff7d6693f527330 Closes-bug: #1427596
* Move SessionClient from HTTPClient to adapterPeter Razumovsky2015-06-261-13/+18
| | | | | | | | | Many projects use keystoneclient adapter for SessionClient realisation, but heatclient use HTTPClient, which is break SessionClient logic (e.g. using credentials and endpoint). Change-Id: I90bc9d9fcd1058c3eca288f08dd134810f1b0000 Closes-bug: #1427596
* Fixed VerifyAll() when test case does ReplayAll()Aleksei Guzev2015-06-191-29/+1
| | | | | | | | | | - VerifyAll() methods moved to setUp into addCleanup method for some tests - redundant VerifyAll() methods were removed - removed ResetAll() methods - fixed some broken tests Change-Id: If3a47e610264fe65d76b34c088a1ab3199d72438 Closes-Bug: #1419469
* Move usage methods *_request to get/post/etcPeter Razumovsky2015-06-091-1/+1
| | | | | | | | HTTPClient has methods get/post/put and others, which use json_request and raw_request, but other code uses requests method instead of them. Change-Id: I74ee34430afdae17f83ccdc877cc882f94651bce
* Move unittests to subdir unitSergey Kraynev2015-05-121-0/+729
Initial migration of tests from tempest. See mail http://lists.openstack.org/pipermail/openstack-dev/2015-February/056916.html Partial-Bug: #1446442 Change-Id: I75daa23f4710ea557dec92f6ee24231430356127