unitests fail with the presence of a local_settings file

Bug #1596466 reported by Yves-Gwenael Bourhis
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Yves-Gwenael Bourhis

Bug Description

The following patch broke stable/mitaka and master unittests because the custom local_settings file is sourced and should not:

https://review.openstack.org/#/q/I05c8fc750c56f6f6bb49a435662e821eb0d6ba30,n,z

this is because we should have "from django.conf import settings" instead of "from openstack_dashboard import settings".

tags: added: mitaka-backport-potential
summary: - unitests fail whit the presence of a local_settings file
+ unitests fail with the presence of a local_settings file
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/334369

Changed in horizon:
assignee: nobody → Yves-Gwenael Bourhis (yves-gwenael-bourhis)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/334375

Changed in horizon:
importance: Undecided → High
milestone: none → newton-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/334369
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=797f823c6ee3a8243996b5f9df08f4c5de2c4f07
Submitter: Jenkins
Branch: master

commit 797f823c6ee3a8243996b5f9df08f4c5de2c4f07
Author: Yves-Gwenael Bourhis <email address hidden>
Date: Mon Jun 27 11:30:21 2016 +0200

    Never import setting from openstack_dashboard

    Unittests have their own settings and should not source openstack_dashboard
    settings.
    It is commonly known that django code should always import settings via
    "from django.conf import settings".

    Change-Id: I4fb5f68ed9595c5f785437b863e2eef7f6ab23c1
    Closes-Bug: #1596466

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/mitaka)

Reviewed: https://review.openstack.org/334375
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=9b2b8e219794dc6a6aca967d455d7892ef468c2e
Submitter: Jenkins
Branch: stable/mitaka

commit 9b2b8e219794dc6a6aca967d455d7892ef468c2e
Author: Yves-Gwenael Bourhis <email address hidden>
Date: Mon Jun 27 11:30:21 2016 +0200

    Never import setting from openstack_dashboard

    Unittests have their own settings and should not source openstack_dashboard
    settings.
    It is commonly known that django code should always import settings via
    "from django.conf import settings".

    Change-Id: I4fb5f68ed9595c5f785437b863e2eef7f6ab23c1
    Closes-Bug: #1596466
    (cherry picked from commit 797f823c6ee3a8243996b5f9df08f4c5de2c4f07)

tags: added: in-stable-mitaka
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 10.0.0.0b2

This issue was fixed in the openstack/horizon 10.0.0.0b2 development milestone.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 9.1.0

This issue was fixed in the openstack/horizon 9.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/horizon 9.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.