Files
deb-python-falcon/tests/test_deps.py
Kurt Griffiths 5493bf8a9b test(mimeparse): Test for the correct version of mimeparse (#871)
Document the difference between python-mimeparse and mimeparse, and
add a test to ensure Linux package maintainers, et al., are pulling
python-mimeparse, not mimeparse.
2016-08-24 22:10:51 -06:00

19 lines
629 B
Python

import mimeparse
import testtools
class TestDeps(testtools.TestCase):
def test_mimeparse_correct_package(self):
"""Ensure we are dealing with python-mimeparse, not mimeparse."""
tokens = mimeparse.__version__.split('.')
msg = ('Incorrect dependency detected. Please install the '
'"python-mimeparse" package instead of the "mimeparse" '
'package.')
# NOTE(kgriffs): python-mimeparse starts at version 1.5.2,
# whereas the mimeparse package is at version 0.1.4 at the time
# of this writing.
self.assertGreater(int(tokens[0]), 0, msg)