[fuel-web] invalid usage of mocks in test-cases

Bug #1493064 reported by Bulat Gaifullin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Bulat Gaifullin

Bug Description

In the following tests uses incorrect methods of mock - object:
TestOpenStackClientProvider.test_clients_providing used method assert_called_with_once that does not exists in mock and automatically creates a mock method that does nothing.

TestOSWLHelpers.test_different_api_versions_handling_for_tenants incorrect test logic, that uses undefined method assert_called_once, that does nothing and test checks nothing as well

to prevent further errors with same cause need to update mock package to version to 1.1.0. or greater
linked bug: #1493061

Tags: area-python
Changed in fuel:
assignee: nobody → Bulat Gaifullin (bgaifullin)
summary: - invalid usage of mocks in test-cases
+ [fuel-web] invalid usage of mocks in test-cases
Changed in fuel:
milestone: none → 8.0
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Changed in fuel:
assignee: Bulat Gaifullin (bgaifullin) → Alexander Kislitsky (akislitsky)
Changed in fuel:
importance: Undecided → Medium
Changed in fuel:
assignee: Alexander Kislitsky (akislitsky) → Bulat Gaifullin (bgaifullin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/221019
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=67b632280256a02ed1ea7c1271475aa9abcb64a4
Submitter: Jenkins
Branch: master

commit 67b632280256a02ed1ea7c1271475aa9abcb64a4
Author: Bulat Gaifullin <email address hidden>
Date: Mon Sep 7 17:24:55 2015 +0300

    invalid usage of mocks in test-cases fixed

     1. fixed typo in method name in test_clients_providing
     2. fixed test logic in test_different_api_versions_handling_for_tenants

    Change-Id: I241481f2d224e16e44a242632484486c3ec6237a
    Closes-Bug: #1493064

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Revision history for this message
Nastya Urlapova (aurlapova) wrote :

nailgun/test/unit/fuel_statistics_tests/test_client_provider.py::TestOpenStackClientProvider::test_clients_providing <- /home/jenkins/workspace/gate-fuel-web/nailgun/nailgun/test/unit/fuel_statistics_tests/test_client_provider.py
[gw2] PASSED

/home/jenkins/workspace/gate-fuel-web/nailgun/nailgun/test/unit/fuel_statistics_tests/test_client_provider.py
nailgun/test/unit/fuel_statistics_tests/test_oswl_helpers.py::TestOSWLHelpers::test_different_api_versions_handling_for_tenants
[gw0] PASSED

https://ci.fuel-infra.org/job/gate-fuel-web/1239/consoleFull

Changed in fuel:
status: Fix Committed → Fix Released
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.