Ejemplo n.º 1
0
    def test_vtluug_none(self):
        term = "Ajgoajh"
        input = Mock(groups=lambda: ['', term])
        vtluugwiki.vtluug(self.phenny, input)

        self.phenny.say.assert_called_once_with( "Can't find anything in "\
                "the VTLUUG Wiki for \"{0}\".".format(term))
Ejemplo n.º 2
0
 def test_vtluug(self):
     self.input.groups.return_value = ['', "VT-Wireless"]
     vtluugwiki.vtluug(self.phenny, self.input)
     out = self.phenny.say.call_args[0][0]
     m = re.match('^.* - https:\/\/vtluug\.org\/wiki\/VT-Wireless$',
                  out,
                  flags=re.UNICODE)
     self.assertTrue(m)
Ejemplo n.º 3
0
 def test_vtluug(self):
     self.input.groups.return_value = ['', "VT-Wireless"]
     vtluugwiki.vtluug(self.phenny, self.input)
     out = self.phenny.say.call_args[0][0]
     m = re.search(r'https://vtluug[.]org/wiki/VT-Wireless',
                   out,
                   flags=re.UNICODE)
     self.assertTrue(m)
Ejemplo n.º 4
0
    def test_vtluug(self):
        input = Mock(groups=lambda: ['', "VT-Wireless"])
        vtluugwiki.vtluug(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^.* - https:\/\/vtluug\.org\/wiki\/VT-Wireless$',
                out, flags=re.UNICODE)
        self.assertTrue(m)
Ejemplo n.º 5
0
    def test_vtluug_none(self):
        self.term = "Ajgoajh"
        self.prepare()

        vtluugwiki.vtluug(self.phenny, self.input)
        out = self.phenny.say.call_args[0][0]

        expected = "Can't find anything in the VTLUUG Wiki for \"{0}\"."
        self.assertEqual(out, expected.format(self.text))
Ejemplo n.º 6
0
    def test_vtluug(self):
        self.term = "VT-Wireless"
        self.prepare()

        vtluugwiki.vtluug(self.phenny, self.input)
        out = self.phenny.say.call_args[0][0]

        self.keywords = ['campus', 'wireless', 'networks']
        self.check_snippet(out)
Ejemplo n.º 7
0
    def test_vtluug_invalid(self):
        self.term = "EAP-TLS"
        self.section = "netcfg"
        self.prepare()

        vtluugwiki.vtluug(self.phenny, self.input)
        out = self.phenny.say.call_args[0][0]

        message = "No '{0}' section found.".format(self.section)
        self.assertEqual(out, '"{0}" - {1}'.format(message, self.url))
Ejemplo n.º 8
0
    def test_vtluug_fragment(self):
        self.term = "EAP-TLS"
        self.section = "netctl"
        self.prepare()

        vtluugwiki.vtluug(self.phenny, self.input)
        out = self.phenny.say.call_args[0][0]

        self.keywords = ['Arch', 'Linux', 'netctl']
        self.check_snippet(out)
Ejemplo n.º 9
0
    def test_vtluug_invalid(self):
        self.term = "EAP-TLS"
        self.section = "netcfg"
        self.prepare()

        vtluugwiki.vtluug(self.phenny, self.input)
        out = self.phenny.say.call_args[0][0]

        message = "No '%s' section found." % self.section
        self.assertEqual(out, '"%s" - %s' % (message, self.url))
Ejemplo n.º 10
0
 def test_vtluug_none(self):
     term = "Ajgoajh"
     self.input.groups.return_value = ['', term]
     vtluugwiki.vtluug(self.phenny, self.input)
     self.phenny.say.assert_called_once_with( "Can't find anything in "\
             "the VTLUUG Wiki for \"{0}\".".format(term))