From abf02a23c3f9722596acd2b169b03b55e4a16a46 Mon Sep 17 00:00:00 2001 From: Sebastian Muthwill Date: Tue, 10 Dec 2024 21:52:38 +0100 Subject: [PATCH] adds test --- tests/test_init.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/test_init.py 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)