mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
df8d7b9d05
twilio.__version__ is a string and twilio.__version_info__ is a tuple of strings containing integers [e.g. ('6', '8', '2')]. The test_twilio_notify unittest fails: ``` ERROR: unit.modules.test_twilio_notify (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: unit.modules.test_twilio_notify Traceback (most recent call last): File "/usr/lib/python3.7/unittest/loader.py", line 434, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.7/unittest/loader.py", line 375, in _get_module_from_name __import__(name) File "tests/unit/modules/test_twilio_notify.py", line 20, in <module> import salt.modules.twilio_notify as twilio_notify File "salt/modules/twilio_notify.py", line 28, in <module> if twilio.__version__ > 5: TypeError: '>' not supported between instances of 'str' and 'int' ``` Fix the twilio version check to use __version_info__ and converting its elements to int. |
||
---|---|---|
.. | ||
integration | ||
kitchen | ||
perf | ||
pkg/rpm | ||
support | ||
unit | ||
utils | ||
__init__.py | ||
buildpackage.py | ||
committer_parser.py | ||
conftest.py | ||
consist.py | ||
eventlisten.py | ||
eventlisten.sh | ||
filename_map.yml | ||
jenkins.py | ||
minionswarm.py | ||
modparser.py | ||
packdump.py | ||
runtests.py | ||
salt-tcpdump.py | ||
saltsh.py | ||
wheeltest.py | ||
whitelist.txt | ||
zypp_plugin.py |