def test_imdb(self): input = Mock(group=lambda x: 'Antitrust') imdb(self.phenny, input) out = self.phenny.reply.call_args[0][0] m = re.match('^.* \(.*\): .* http://imdb.com/title/[a-z\d]+$', out, flags=re.UNICODE) self.assertTrue(m)
def test_imdb(self): self.input.group.return_value = 'Antitrust' imdb(self.phenny, self.input) out = self.phenny.say.call_args[0][0] pattern = re.compile(r'^.* \(.*\): .* http://imdb.com/title/[a-z\d]+$', flags=re.UNICODE) self.assertRegex(out, pattern)
def test_imdb(self): input = Mock(group=lambda x: 'Antitrust') imdb(self.phenny, input) out = self.phenny.say.call_args[0][0] pattern = re.compile(r'^.* \(.*\): .* http://imdb.com/title/[a-z\d]+$', flags=re.UNICODE) self.assertRegex(out, pattern)
def test_imdb(self): input = Mock(group=lambda x: 'Antitrust') imdb(self.phenny, input) out = self.phenny.say.call_args[0][0] pattern = re.compile( r'^.* \(.*\): .* http://imdb.com/title/[a-z\d]+$', flags=re.UNICODE) self.assertRegex(out, pattern)
def test_imdb_none(self): self.input.group.return_value = None imdb(self.phenny, self.input) self.phenny.say.assert_called_once_with(".imdb what?")
def test_imdb_none(self): input = Mock(group=lambda x: None) imdb(self.phenny, input) self.phenny.say.assert_called_once_with( ".imdb what?")
def test_imdb_none(self): input = Mock(group=lambda x: None) imdb(self.phenny, input) self.phenny.say.assert_called_once_with(".imdb what?")