Skip to content

Commit

Permalink
add test for empty field #25
Browse files Browse the repository at this point in the history
  • Loading branch information
iulica committed Sep 19, 2024
1 parent 1d2ad75 commit 51a8db7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Binary file added tests/test_empty_field.docx
Binary file not shown.
12 changes: 12 additions & 0 deletions tests/test_empty_field.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import unittest
from os import path

from mailmerge import MailMerge


class EmptyFieldTest(unittest.TestCase):
def test(self):
with MailMerge(
path.join(path.dirname(__file__), "test_empty_field.docx")
) as document:
self.assertEqual(document.get_merge_fields(), set())

0 comments on commit 51a8db7

Please sign in to comment.