示例#1
0
 def test__match_Should_NotSetText_When_RegexNoMatch(
         self, sanitize_patch, *patches):
     status_line = StatusLine(0, regex={'text': 'match this'})
     status_line.text = 'something'
     status_line.match('hello world')
     self.assertEqual(status_line.text, 'something')
示例#2
0
 def test__match_Should_SetText_When_Regex(self, sanitize_patch, *patches):
     status_line = StatusLine(0, regex={'text': 'hello world'})
     status_line.match('hello world')
     self.assertEqual(status_line.text, sanitize_patch.return_value)