Hyper-V tests can be refactored to avoid multiple mox.VerifyAll() calls
Bug #1177570 reported by
Alessandro Pilotti
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Low
|
Unassigned |
Bug Description
The Hyper-V tests, specifically test_hypervap.py are currently using the mox framework for all the tests.
As a result, it's possible to move the mox.VerifyAll() call from the single tests to tearDown().
The advantages are:
1) Less code bloathing due to duplicated VerifyAll() calls at
the end of each individual test
2) Ensure that VerifyAll() is called in cases in which the developer might
forget about adding it at the end of the test
Changed in nova: | |
assignee: | nobody → Alessandro Pilotti (alexpilotti) |
tags: | added: hyper-v |
Changed in nova: | |
assignee: | Alessandro Pilotti (alexpilotti) → nobody |
To post a comment you must log in.
Is this a good idea? I can't think of any other test which has its verify in the tear down. Are there existing examples?