Skip to content

Commit

Permalink
test: add validator test testNotEmptyString
Browse files Browse the repository at this point in the history
  • Loading branch information
KernAttila committed Aug 8, 2024
1 parent 03c08b6 commit 2c2bf7a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cuesubmit/tests/Validators_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
matchNumbersOnly,
matchPositiveIntegers,
moreThan3Chars,
notEmptyString,
)


Expand Down Expand Up @@ -103,6 +104,13 @@ def testMoreThan3Chars(self):
self.assertFalse(moreThan3Chars(''))

self.assertRaises(TypeError, moreThan3Chars, None)
def testNotEmptyString(self):
self.assertTrue(notEmptyString('abcd'))
self.assertTrue(notEmptyString('1234'))
self.assertTrue(notEmptyString(' '))
self.assertTrue(notEmptyString('abc'))
self.assertFalse(notEmptyString(''))
self.assertRaises(TypeError, notEmptyString, None)

if __name__ == '__main__':
unittest.main()

0 comments on commit 2c2bf7a

Please sign in to comment.