コード例 #1
0
 def test_constructor_sets_name(self):
     target = tasknamefilter.TaskNameFilter(mock.Mock(), 'test')
     self.assertEqual('test', target.name)
コード例 #2
0
 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))
コード例 #3
0
 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))
コード例 #4
0
 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))