From c41bb4e32c51e1eaf1deb06f602aceeb6f783734 Mon Sep 17 00:00:00 2001 From: Philipp Grimm Date: Thu, 28 Mar 2024 22:19:28 +0100 Subject: [PATCH] tests improved --- tests/test_metadata.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 23896706..16dcb15e 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -32,6 +32,9 @@ def get_version_of_required_eltako14bus(self): return r.split('==')[1].strip() return None + def get_version_of_eltako_integration(self): + return self.get_manifest()['version'] + def test_check_all_installed_dependencies(self): manifest = self.get_manifest() @@ -53,4 +56,11 @@ def test_eltako14bus_required_and_installed_is_the_same(self): self.assertIsNotNone(installed) self.assertIsNotNone(required) - self.assertEqual(installed, required) \ No newline at end of file + self.assertEqual(installed, required) + + def test_if_changes_are_documented(self): + changes_filename = os.path.join(os.getcwd(), 'changes.md') + with open(changes_filename, 'r', encoding="utf-8") as f: + changes_text = f.read() + + self.assertTrue( f'## Version {self.get_version_of_eltako_integration()}' in changes_text ) \ No newline at end of file