After Django 2.0 support, we no longer supports Django 1.10 or older
(Actually Django 1.10 seems to work though).
The current django.VERSION branches are all related to Django 1.10
or older, so we can drop all conditions.
py35dj20 job is now voting.
blueprint django2-support
Change-Id: Iefc0ab1c62c82f2842ec7761a9b981da9351cbd2
In Python 3.5 with Django 2.0 env, some tests fail.
This commit fixes them.
blueprint django2-support
Change-Id: Ib5ba46d501956ebc7d4f69f17ee86f44319418d2
https://docs.djangoproject.com/en/2.0/releases/2.0/#miscellaneous
---
The SessionAuthenticationMiddleware class is removed. It provided
no functionality since session authentication is unconditionally
enabled in Django 1.10.
---
blueprint django2-support
Change-Id: I2767e01ec8879d6886152a0ed67f6738eb17209c
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3
blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
django 1.8 to 1.10 are incompatible with django 2.0.
We only supports Django >= 1.11 in Rocky and UTs with
Django <= 1.10 are no longer needed.
Conditions using django.VERSION will be dropped in a later patch
only because moving them to this patch causes many merge conflicts.
blueprint django2-support
Change-Id: I0611297e70d8e58d53e94635b0b7175d94df195b
During translation phase it's required to pull different versions from
translation server instead only master branch.
Change-Id: I27ab5f678aae71846f5ec6191be08e05cf72e53e
This patch changes mox to mock for the following test modules:
* openstack_dashboard/test/unit/api/test_nova.py
* openstack_dashboard/test/unit/api/rest/test_nova.py
Partially-Implements: blueprint mock-framework-in-unit-tests
Change-Id: I894ba4f1ab2123ce36f451013d8f7ebd70d9bd0f
This commit introduces 'use_mox' attribute to TestCase class.
If this is set to False, TestCase does not setup mox.
In addition, a common method to emit the deprecation warning
was introduced in APITestCase.
Part of blueprint mock-framework-in-unit-tests
Change-Id: I1e3df7ea2a867b8a7aa69523bed2beaab9663dc0
Yaml.load() return Python object may be dangerous if you receive a YAML
document from an untrusted source such as the Internet. The function
yaml.safe_load() limits this ability to simple Python objects like integers or
lists.
Reference:
https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html
Change-Id: I7d130f1b4a1a00a255ce21742c9d89ba7f2bd90f
The template for testing ngdetails view is remaining in old directory,
so this patch moves it to more proper directory.
Change-Id: I321779ae115c462cf095cc7697fe8a3959f3d288
On the project creation router page, if we don't check "Enable Admin
State" option, when the router is created, "Admin State" is displayed
as UP. This inconsistency is because the judgment condition of [1]
doesn't hold which causes the "admin_state_up" parameter not to be
passed by the call creation router interface. In this case, the
back-end defaults to "admin_state_up" to be UP.
Since the router "Enable Admin State" option has an initial value of
True, there is no need to check for [1].
[1] https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/routers/forms.py#L121
Change-Id: I6b95ffa680eab5c29d2bca6c91fc7f028f7f519a
Closes-Bug:#1748777
Also improves the warning message of UnhashableWarning
and test_neutron UnhashableWarning.
Closes-Bug: #1747204
Change-Id: I876e3219dac570e8f7b10c5c126df74ca73f5197
Network topology "Graph" tab always says "There are no networks,
routers, or connected instances to display."
This happens after a fix for bug 1661350
(commit f35eaa2d13fc5aff31b9a83dc729cc20b91fc611) was merged.
The problem with that in checking the length of object.
So always will be equal undefined,
also check the object before getting filled.
Closes-Bug: #1747196
Change-Id: I72dd8d2b472677411635f58309c780a8d602ffe3
When networks or routers are filtered by a tenant which does not exist,
there will be return a list no filtered. But we expect an empty list.
Change-Id: I8faca01ab67240a76818d6752f796a6de3c51b5f
Closes-Bug: #1744846
When doing theme customization with templates
collectstatic failes with a traceback
Change-Id: I0fdb80ddde1f73b657d445c75b55636d6f2e8d88
Closes-bug: #1744239