HttpRequest.is_ajax() was marked as deprecated since Django 3.1 and will be
removed in Django 4.0 [1].
While the current implementation of is_ajax() relies on a jQuery-specific way
of signifying AJAX as noted in the Django relnotes, horizon works with this.
Thus this commit copies the existing logic of HttpRequest.is_ajax() to the
horizon repo (as horizon.utils.http.is_ajax()) and consumes it.
https: //docs.djangoproject.com/en/4.0/releases/3.1/#features-deprecated-in-3-1
Change-Id: I3def53033524985818a891a1b9d4659fad4ba2ba
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
+ Adds endpoint for listing available policies
+ Support to select a storage policy for new containers
+ Display container storage polcy on dashboard.
Change-Id: I588452fd5d6417859f5dd19ccedcb18f420ab646
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: I2de669d8e89b8daeb7ee5405ffab35af6307c40b
- Add use_mox = True to tests which still depend on mox
- Remove use_mox = False from all tests converted into mock
- Update the warning messages
- Replace 'S'-release with 'Stein'
Part of blueprint mock-framework-in-unit-tests
Change-Id: I208185e97b2de346304a09643a9cb3f1425a7683
Signed-off-by: Akihiro Motoki <amotoki@gmail.com>
The current REST API tests have a lot of rooms to be improved like:
- mocking the whole module of the API wrapper
- Unnecesary setUp()
- Test data should not be accessed directly via TestData
This commit improves test/unit/api/rest/test_swift.py.
Change-Id: I3532abee7febafea0f4cdc6ebfcc62f3cecd52eb
Partial-Bug: #1752917
This patch changes mox to mock for the following test modules:
* openstack_dashboard/test/unit/api/test_swift.py
* openstack_dashboard/test/unit/api/rest/test_swift.py
Partially-Implements: blueprint mock-framework-in-unit-tests
Change-Id: I3c920564b781c9c1c97bd6ee22b834504c94cb60
This commit relocates test codes in openstack_dashboard
according to blueprint relocation-test-codes.
Change-Id: I397a5a47fe9c1bf3a498c22056d924bf409c514b