mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix skipping test when boto is not installed
When boto and moto are not installed, the BotoVpcTestCaseBase() should be skipped. _get_boto_version() and _get_moto_version() require that boto and moto are installed, but are called anyway in the skipIf condition.
This commit is contained in:
parent
2b9b262357
commit
76d44e9490
1 changed files with 3 additions and 2 deletions
|
@ -132,8 +132,9 @@ def _has_required_moto():
|
|||
@skipIf(HAS_MOTO is False, 'The moto module must be installed.')
|
||||
@skipIf(_has_required_boto() is False, 'The boto module must be greater than'
|
||||
' or equal to version {}. Installed: {}'
|
||||
.format(required_boto_version, _get_boto_version()))
|
||||
@skipIf(_has_required_moto() is False, 'The moto version must be >= to version {}. Installed: {}'.format(required_moto_version, _get_moto_version()))
|
||||
.format(required_boto_version, _get_boto_version() if HAS_BOTO else 'None'))
|
||||
@skipIf(_has_required_moto() is False, 'The moto version must be >= to version {}. Installed: {}'
|
||||
.format(required_moto_version, _get_moto_version() if HAS_MOTO else 'None'))
|
||||
class BotoVpcTestCaseBase(TestCase, LoaderModuleMockMixin):
|
||||
conn3 = None
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue