Exemplo n.º 1
0
 def test_multi(self):
     self.input.group.return_value = 'john'
     hs(self.phenny, self.input)
     pattern = re.compile(
         '^Multiple results found; try http://search\.vt\.edu/search/people\.html\?q=.*$',
         flags=re.UNICODE)
     out = self.phenny.reply.call_args[0][0]
     self.assertRegex(out, pattern)
Exemplo n.º 2
0
 def test_multi(self):
     self.input.group.return_value = 'john'
     hs.hs(self.phenny, self.input)
     pattern = re.compile(
         '^Multiple results found; try http://search\.vt\.edu/search/people\.html\?q=.*$',
         flags=re.UNICODE)
     out = self.phenny.reply.call_args[0][0]
     self.assertRegex(out, pattern)
Exemplo n.º 3
0
 def test_single(self):
     self.input.group.return_value = 'marchany'
     hs(self.phenny, self.input)
     pattern = re.compile(
         '^.* - http://search\.vt\.edu/search/person\.html\?person=\d+$',
         flags=re.UNICODE)
     out = self.phenny.reply.call_args[0][0]
     self.assertRegex(out, pattern)
Exemplo n.º 4
0
 def test_single(self):
     self.input.group.return_value = 'marchany'
     hs.hs(self.phenny, self.input)
     pattern = re.compile(
         '^.* - http://search\.vt\.edu/search/person\.html\?person=\d+$',
         flags=re.UNICODE)
     out = self.phenny.reply.call_args[0][0]
     self.assertRegex(out, pattern)
Exemplo n.º 5
0
    def test_multi(self):
        input = Mock(group=lambda x: 'john')
        hs(self.phenny, input)

        out = self.phenny.reply.call_args[0][0]
        m = re.match(
            '^Multiple results found; try http://search\.vt\.edu/search/people\.html\?q=.*$',
            out, flags=re.UNICODE)
        self.assertTrue(m)
Exemplo n.º 6
0
    def test_single(self):
        input = Mock(group=lambda x: 'marchany')
        hs(self.phenny, input)

        out = self.phenny.reply.call_args[0][0]
        m = re.match(
            '^.* - http://search\.vt\.edu/search/person\.html\?person=\d+$',
            out, flags=re.UNICODE)
        self.assertTrue(m)
Exemplo n.º 7
0
    def test_multi(self):
        input = Mock(group=lambda x: 'john')
        hs(self.phenny, input)

        pattern = re.compile(
            '^Multiple results found; try http://search\.vt\.edu/search/people\.html\?q=.*$',
            flags=re.UNICODE)
        out = self.phenny.reply.call_args[0][0]
        self.assertRegex(out, pattern)
Exemplo n.º 8
0
    def test_single(self):
        input = Mock(group=lambda x: 'marchany')
        hs(self.phenny, input)

        pattern = re.compile(
            '^.* - http://search\.vt\.edu/search/person\.html\?person=\d+$',
            flags=re.UNICODE)
        out = self.phenny.reply.call_args[0][0]
        self.assertRegex(out, pattern)
Exemplo n.º 9
0
    def test_multi(self):
        input = Mock(group=lambda x: 'john')
        hs(self.phenny, input)

        out = self.phenny.reply.call_args[0][0]
        m = re.match(
            '^Multiple results found; try http://search\.vt\.edu/search/people\.html\?q=.*$',
            out,
            flags=re.UNICODE)
        self.assertTrue(m)
Exemplo n.º 10
0
    def test_single(self):
        input = Mock(group=lambda x: 'marchany')
        hs(self.phenny, input)

        out = self.phenny.reply.call_args[0][0]
        m = re.match(
            '^.* - http://search\.vt\.edu/search/person\.html\?person=\d+$',
            out,
            flags=re.UNICODE)
        self.assertTrue(m)
Exemplo n.º 11
0
 def test_none(self):
     self.input.group.return_value = 'THIS_IS_NOT_A_REAL_SEARCH_QUERY'
     hs(self.phenny, self.input)
     out = self.phenny.reply.call_args[0][0]
     self.phenny.reply.assert_called_once_with("No results found")
Exemplo n.º 12
0
 def test_2char(self):
     self.input.group.return_value = 'hs'
     hs(self.phenny, self.input)
     out = self.phenny.reply.call_args[0][0]
     self.phenny.reply.assert_called_once_with("No results found")
Exemplo n.º 13
0
 def test_none(self):
     self.input.group.return_value = 'THIS_IS_NOT_A_REAL_SEARCH_QUERY'
     hs.hs(self.phenny, self.input)
     out = self.phenny.reply.call_args[0][0]
     self.phenny.reply.assert_called_once_with("No results found")
Exemplo n.º 14
0
 def test_2char(self):
     self.input.group.return_value = 'hs'
     hs.hs(self.phenny, self.input)
     out = self.phenny.reply.call_args[0][0]
     self.phenny.reply.assert_called_once_with("No results found")
Exemplo n.º 15
0
    def test_none(self):
        input = Mock(group=lambda x: 'THIS_IS_NOT_A_REAL_SEARCH_QUERY')
        hs(self.phenny, input)

        out = self.phenny.reply.call_args[0][0]
        self.phenny.reply.assert_called_once_with("No results found")
Exemplo n.º 16
0
    def test_2char(self):
        input = Mock(group=lambda x: 'hs')
        hs(self.phenny, input)

        out = self.phenny.reply.call_args[0][0]
        self.phenny.reply.assert_called_once_with("No results found")