Commit Graph

7 Commits

Author SHA1 Message Date
Akihiro Motoki 7052b7f065 Address RemovedInDjango40Warning (7)
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
2022-02-04 16:27:32 +09:00
Sam Morrison 92d832028d Fix tenant floating_ip_allocation call in neutron rest api.
The call to allocate a new floating IP was incorrecting calling
tenant_floating_ip_allocate, this is used by neutron-lbaas-dashboard.

Change-Id: Ia4d1367ccd309a074a0ea84a555d7de6c07971a6
Closes-bug: #1831954
2019-06-07 10:47:41 +10:00
Jens Harbott 9e703aec2f Add DNS parameters to Floating IP panels
This adds support for the "DNS Domain" and "DNS Name" options to the
panels for listing and allocation Floating IPs.

These options are available as a Neutron extension, so we need to
make them conditional based on the availability of that extension.

Change-Id: Ife8e19aac44dccbdf11a6a6d4bb50cd3b7ed8d8e
2018-07-22 20:24:36 +09:00
Akihiro Motoki 58019a7411 Disable mox usage by default in test helper
- 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>
2018-04-20 03:34:51 +00:00
Akihiro Motoki f343212805 Improve mocking in REST API tests (test_network)
The current REST API tests have a lot of rooms to be improved like:
- mocking the whole module of the API wrapper

This commit improves test/unit/api/rest/test_network.py.

Change-Id: I1a1e6b69ac9334b05fc88b4568e823ae490a0b0b
Partial-Bug: #1752917
2018-03-31 23:23:25 +09:00
Akihiro Motoki c5cd0b2048 Switch Neutron/Network API tests to mock
This patch changes mox to mock for the following test modules:
* openstack_dashboard/test/unit/api/test_network.py
* openstack_dashboard/test/unit/api/test_neutron.py
* openstack_dashboard/test/unit/api/rest/test_network.py
* openstack_dashboard/test/unit/api/rest/test_neutron.py

Partially-Implements: blueprint mock-framework-in-unit-tests

Change-Id: Ib97fb1c06a883fb9fd5ce39b8fe2362a88135692
2018-03-28 18:39:14 +00:00
Akihiro Motoki f3af02f20f openstack_dashboard: Move test files to match module structure
This commit relocates test codes in openstack_dashboard
according to blueprint relocation-test-codes.

Change-Id: I397a5a47fe9c1bf3a498c22056d924bf409c514b
2017-12-09 21:38:06 +09:00