Commit Graph

7 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
zhurong 17a139b842 Fix filter image snapshot type with glancev2
Change-Id: Iccfcc0b21f500a8c1de8b1efd1d565979f400e18
2017-04-22 20:26:08 +00:00
Felipe Monteiro 273ed4797e Update glanceclient from v1 to v2 to avoid deprecation errors.
Currently, the app-catalog/images view in Horizon is throwing
a 300 HttpMultipleChoices exception, with the details:
"Requested version of OpenStack Images API is not available."

Also, the glance v1 client is deprecated, so we should move to glance
v2 wherever possible.

This patch, therefore, removes glanceclient v1 dependency
from murano dashboard as much as possible, especially
given that Glance team intends on removing it from Pike [0].

The only remaining places where the glanceclient v1 is kept
are:
  - in _ensure_images in muranodashboard/packages/views.py,
    which uses copy_from functionality from glanceclient v1 to load
    images automatically.
  - done in ImportPackageWizard, which sets each package to
    public if the image that was uploaded was public

[0] https://review.openstack.org/#/c/328390/

Closes-Bug: #1675171
Partially-Implements blueprint: migrate-to-glance-v2
Change-Id: Id5348bc34216d5f5ed7fbb8caf71139d64db3f61
2017-04-22 20:16:23 +00:00
zhurong f9e18f725c Filter out the snapshot image type
Create the snapshot will copy the image's metadata,
so the snapshot image type will show in the Image table
and configure application image field.
This patch filter out the snapshot image type.

Change-Id: I4a93b75730da9a0f3a9969687e684ee8dfeff815
Closes-Bug: #1650403
2017-04-11 16:02:41 +08:00
Samantha Blanco 2e0e7a5f8b Increase unit test coverage for catalog and images
Implements bp: murano-unit-test-coverage

Change-Id: I8c89d0cb772f3197c95a051c9c01919e5b1c5149
2016-11-02 21:01:10 -04:00