예제 #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)
예제 #2
0
파일: test_hs.py 프로젝트: goavki/phenny
 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)
예제 #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)
예제 #4
0
파일: test_hs.py 프로젝트: goavki/phenny
 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)
예제 #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)
예제 #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)
예제 #7
0
파일: test_hs.py 프로젝트: vtluug/phenny
    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)
예제 #8
0
파일: test_hs.py 프로젝트: vtluug/phenny
    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)
예제 #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)
예제 #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)
예제 #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")
예제 #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")
예제 #13
0
파일: test_hs.py 프로젝트: goavki/phenny
 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")
예제 #14
0
파일: test_hs.py 프로젝트: goavki/phenny
 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")
예제 #15
0
파일: test_hs.py 프로젝트: vtluug/phenny
    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")
예제 #16
0
파일: test_hs.py 프로젝트: vtluug/phenny
    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")