Switch to use package mock of version 1.1.0 or greater

Bug #1493061 reported by Bulat Gaifullin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Confirmed
Medium
Fuel Sustaining
Mitaka
Won't Fix
Medium
Fuel Python (Deprecated)
Newton
Confirmed
Medium
Fuel Sustaining

Bug Description

since version 1.1.0 introduced fix, that prevent to call any method, that starts with 'assert' and not implement in mock class.
for example:
in version 1.0.1 this code runs properly:

some_mock.assert_this_method_is_not_defined()

it will create a new mock method and test pass even it checks nothing

in new version some code will generate AttributeError unless special flag usafe_mock is set.

Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
milestone: none → 8.0
Revision history for this message
Alexander Kislitsky (akislitsky) wrote :

Now we can write 'assert_called_with_once' in code and believe, that test performs check.
For instance: [1]

[1] https://github.com/stackforge/fuel-web/blob/f882c428db97ee1eb93a4871f9d5857c5a7771b2/nailgun/nailgun/test/unit/fuel_statistics_tests/test_client_provider.py#L91

Set priority to Medium.

Changed in fuel:
importance: Undecided → Medium
Changed in fuel:
status: New → Confirmed
Dmitry Pyzhov (dpyzhov)
tags: added: tech-debt
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 8.0 → 9.0
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.