mirror of
https://github.com/Casvt/MIND.git
synced 2026-02-19 11:54:46 -05:00
20 lines
601 B
Python
20 lines
601 B
Python
import unittest
|
|
|
|
from backend.base.definitions import GeneralReminderData
|
|
from backend.base.helpers import search_filter
|
|
|
|
|
|
class Test_Reminder_Handler(unittest.TestCase):
|
|
def test_filter_function(self):
|
|
p = GeneralReminderData(
|
|
id=1,
|
|
title='TITLE',
|
|
text='TEXT',
|
|
color=None,
|
|
notification_services=[]
|
|
)
|
|
for test_case in ('', 'TITLE', 'ex', 'ti tle'):
|
|
self.assertTrue(search_filter(test_case, p))
|
|
for test_case in ('TEXTTITLE', 'Hello'):
|
|
self.assertFalse(search_filter(test_case, p))
|