def test_constructor_sets_name(self): target = tasknamefilter.TaskNameFilter(mock.Mock(), 'test') self.assertEqual('test', target.name)
def test_is_match_returns_false_on_non_matching_index(self): mock_context = mock.Mock() task = mock.Mock() task.name = 'woble' self.assertFalse( tasknamefilter.TaskNameFilter(mock_context, 'test').is_match(task))
def test_is_match_returns_true_when_name_contains_different_case(self): mock_context = mock.Mock() task = mock.Mock() task.name = 'oneTESTtwo' self.assertTrue( tasknamefilter.TaskNameFilter(mock_context, 'test').is_match(task))
def test_is_match_returns_true_on_matching_name(self): mock_context = mock.Mock() task = mock.Mock() task.name = 'test' self.assertTrue( tasknamefilter.TaskNameFilter(mock_context, 'test').is_match(task))