예제 #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)
예제 #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)
예제 #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)
예제 #4
0
파일: test_tfw.py 프로젝트: Athemis/phenny
    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)
예제 #5
0
파일: test_tfw.py 프로젝트: Athemis/phenny
    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)
예제 #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)
예제 #7
0
파일: test_tfw.py 프로젝트: vtluug/phenny
    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."
        )
예제 #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)
예제 #9
0
파일: test_tfw.py 프로젝트: KaiCode2/phenny
    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)
예제 #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)
예제 #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)
예제 #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.")
예제 #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?")
예제 #14
0
파일: test_tfw.py 프로젝트: Athemis/phenny
 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?")
예제 #15
0
파일: test_tfw.py 프로젝트: KaiCode2/phenny
    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.")
예제 #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.")
예제 #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.")