diff --git a/tests/test_init.py b/tests/test_init.py new file mode 100644 index 00000000..a4932e14 --- /dev/null +++ b/tests/test_init.py @@ -0,0 +1,12 @@ +from django.test import TestCase +from importlib.metadata import version, PackageNotFoundError +from . import __version__ + +class TestNewsletterInit(TestCase): + + def test_version(self): + try: + expected_version = version("django-newsletter") + except PackageNotFoundError: + expected_version = None + self.assertEqual(__version__, expected_version)