Commit Graph

5 Commits

Author SHA1 Message Date
Corey Bryant d956d059f9 Django 4.x: Replace removed features
force_text(), ugettext_lazy(), ungettext_lazy(), urlquote_plus()
and is_ajax() are removed in 4.0.
https: //docs.djangoproject.com/en/4.0/releases/4.0/

Co-Authored-By: manchandavishal <manchandavishal143@gmail.com>

Change-Id: I9e43926cc3011b8b7321bbec59bebe915502eb4a
2022-12-01 23:05:33 +05:30
Sean McGinnis 22efa8fd7f Use unittest.mock instead of third party mock
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: I5ad2c7a44dee2e19ab2576f206c69d94126a22b1
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Co-Authored-By: zhurong <aaronzhu1121@gmail.com>
2020-04-20 03:54:03 -07:00
zhurong 4985bfa010 Switch test runner to django default runner
nose is not actively maintained now and Django default test runner
seems to have enough features.

Horizon test setting no longer depends on nose and related stuffs.
This commit cleans up nose related dependencies.
The change was made in horizon Rocky-3,
so horizon 14.0.0.0b3 is required at least.

And murano-dashboard using unittest instead of testtools.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I419e0e166ea88c3ab1203f35ffa00928cf94acb1
Depends-On: https://review.openstack.org/599156/
2018-10-09 02:22:08 +00:00
Felipe Monteiro 51cbeb6640 Fix missing import package button in murano dashboard
After https://review.openstack.org/#/c/476273/ was merged, murano
dashboard is throwing errors related to listing categories when
trying to import a package. Currently, python-muranoclient still
contains a function [0] for listing categories using the deprecated
API v1/packages/categories. The problem is that murano dashboard
calls this function [1][2][3] in python-muranoclient which throws a 404,
as the deprecated API was removed from murano.

This commit replaces instances of client.packages.categories() with
client.categories.list(). However, while the former returns a list
of category names, the latter returns of a list of category objects
-- so they then need to be iterated over to retrieve the list
of category names.

[0] 08411aa8d2/muranoclient/v1/packages.py (L52)
[1] f98e08d827/muranodashboard/packages/forms.py (L216)
[2] f98e08d827/muranodashboard/packages/forms.py (L288)
[3] bc8e4b97d0/muranodashboard/packages/tables.py (L54)

Change-Id: I715b1c9ccfdd044980596cc6d966062e0386884c
Partial-Bug: #1701067
2017-07-02 00:55:15 +00:00
Felipe Monteiro 6faf4f31f5 Increase unit test coverage for muranodashboard Packages Tables
and Packages API.

In addition, renamed and moved the following test files for
better organization in the unit test directory:
- test_tables -> environments/test_tables
- test_packages -> packages/test_api

Lastly, updated packages/test_views to fix single failing
test in py27-mitaka-ubuntu-xenial.

Implements bp: murano-unit-test-coverage

Change-Id: I57813b0c68b4538616f6ecf03d2b92d535556645
2016-11-16 17:07:31 -05:00