Ejemplo n.º 1
0
 def test_meter(self):
     self.input.group.return_value = '24060'
     tfw.tfw(self.phenny, self.input)
     out = self.phenny.say.call_args[0][0]
     m = re.match('^[\-\d\.]+ Meters‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out,
                  flags=re.UNICODE)
     self.assertTrue(m)
Ejemplo n.º 2
0
    def test_fahrenheit(self):
        input = Mock(group=lambda x: '24060')
        tfw(self.phenny, input, fahrenheit=True)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^\d+°F‽ .* \- .*$', out, flags=re.UNICODE)
        self.assertTrue(m)
Ejemplo n.º 3
0
    def test_mev(self):
        input = Mock(group=lambda x: '24060')
        tfw(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^[\d\.]+ meV‽ .* \- .*$', out, flags=re.UNICODE)
        self.assertTrue(m)
Ejemplo n.º 4
0
    def test_fahrenheit(self):
        input = Mock(group=lambda x: '24060')
        tfw(self.phenny, input, fahrenheit=True)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^\d+°F‽ .* \- .*$', out, flags=re.UNICODE)
        self.assertTrue(m)
Ejemplo n.º 5
0
    def test_mev(self):
        input = Mock(group=lambda x: '24060')
        tfw(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^[\d\.]+ meV‽ .* \- .*$', out, flags=re.UNICODE)
        self.assertTrue(m)
Ejemplo n.º 6
0
 def test_fahrenheit(self):
     self.input.group.return_value = '24060'
     tfw.tfw(self.phenny, self.input, fahrenheit=True)
     out = self.phenny.say.call_args[0][0]
     m = re.match('^[\-\d]+°F‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out,
                  flags=re.UNICODE)
     self.assertTrue(m)
Ejemplo n.º 7
0
    def test_badloc(self):
        input = Mock(group=lambda x: 'tu3jgoajgoahghqog')
        tfw.tfw(self.phenny, input)

        self.phenny.say.assert_called_once_with(
            "WHERE THE F**K IS THAT? I guess you might think it's a place, but no one else does. Try again."
        )
Ejemplo n.º 8
0
    def test_meter(self):
        input = Mock(group=lambda x: '24060')
        tfw.tfw(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^[\-\d\.]+ Meters‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out,
                     flags=re.UNICODE)
        self.assertTrue(m)
Ejemplo n.º 9
0
    def test_celsius(self):
        input = Mock(group=lambda x: '24060')
        tfw.tfw(self.phenny, input, celsius=True)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^[\-\d]+°C‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out,
                     flags=re.UNICODE)
        self.assertTrue(m)
Ejemplo n.º 10
0
    def test_celsius(self):
        input = Mock(group=lambda x: '24060')
        tfw.tfw(self.phenny, input, celsius=True)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^[\-\d]+°C‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$',
                     out,
                     flags=re.UNICODE)
        self.assertTrue(m)
Ejemplo n.º 11
0
    def test_meter(self):
        input = Mock(group=lambda x: '24060')
        tfw.tfw(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        m = re.match('^[\-\d\.]+ Meters‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$',
                     out,
                     flags=re.UNICODE)
        self.assertTrue(m)
Ejemplo n.º 12
0
    def test_badloc(self):
        input = Mock(group=lambda x: 'tu3jgoajgoahghqog')
        tfw.tfw(self.phenny, input)

        self.phenny.say.assert_called_once_with(
            "WHERE THE F**K IS THAT? Try another location.")
Ejemplo n.º 13
0
    def test_badloc(self):
        input = Mock(group=lambda x: 'tu3jgoajgoahghqog')
        tfw(self.phenny, input)

        self.phenny.say.assert_called_once_with(
            "UNKNOWN F*****G LOCATION. Try another?")
Ejemplo n.º 14
0
 def test_badloc(self):
     input = Mock(group=lambda x: 'tu3jgoajgoahghqog')
     tfw(self.phenny, input)
 
     self.phenny.say.assert_called_once_with("UNKNOWN F*****G LOCATION. Try another?")
Ejemplo n.º 15
0
    def test_badloc(self):
        input = Mock(group=lambda x: 'tu3jgoajgoahghqog')
        tfw.tfw(self.phenny, input)

        self.phenny.say.assert_called_once_with(
            "WHERE THE F**K IS THAT? Try another location.")
Ejemplo n.º 16
0
    def test_badloc(self):
        input = Mock(group=lambda x: 'tu3jgoajgoahghqog')
        tfw.tfw(self.phenny, input)

        self.phenny.say.assert_called_once_with(
            "WHERE THE F**K IS THAT? I guess you might think it's a place, but no one else does. Try again.")
Ejemplo n.º 17
0
 def test_badloc(self):
     self.input.group.return_value = 'tu3jgoajgoahghqog'
     tfw.tfw(self.phenny, self.input)
     self.phenny.say.assert_called_once_with(
         "WHERE THE F**K IS THAT? Try another location.")