Example #1
0
    def test_lettercase(self):
        input = Mock(group=self.makegroup('1', 'btc', 'EuR'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertRegex(out, r'\d+\.\d{2} EUR')
Example #2
0
    def test_xzzbtc(self):
        input = Mock(group=self.makegroup('1', 'BTC', 'XZZ'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertNotRegex(out, r'[\d\.]+ BTC')
Example #3
0
    def test_invalid(self):
        input = Mock(group=self.makegroup('.-1', 'USD'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertNotRegex(out, r'[\d\.]+ BTC')
Example #4
0
    def test_eur(self):
        input = Mock(group=self.makegroup('1', 'EUR'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertRegex(out, r'[\d\.]+ BTC')
Example #5
0
    def test_eurbtc(self):
        input = Mock(group=self.makegroup('1', 'BTC', 'EUR'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertRegex(out, r'\d+\.\d{2} EUR')
Example #6
0
    def test_lettercase(self):
        input = Mock(group=self.makegroup('1', 'btc', 'EuR'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertRegex(out, r'\d+\.\d{2} EUR')
Example #7
0
    def test_usd_decimal(self):
        input = Mock(group=self.makegroup('1.25', 'USD'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertRegex(out, r'[\d\.]+ BTC')
Example #8
0
    def test_invalid(self):
        input = Mock(group=self.makegroup('.-1', 'USD'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertNotRegex(out, r'[\d\.]+ BTC')
Example #9
0
    def test_xzzbtc(self):
        input = Mock(group=self.makegroup('1', 'BTC', 'XZZ'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertNotRegex(out, r'[\d\.]+ BTC')
Example #10
0
    def test_eurbtc(self):
        input = Mock(group=self.makegroup('1', 'BTC', 'EUR'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertRegex(out, r'\d+\.\d{2} EUR')
Example #11
0
    def test_eur(self):
        input = Mock(group=self.makegroup('1', 'EUR'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertRegex(out, r'[\d\.]+ BTC')
Example #12
0
    def test_usd_decimal(self):
        input = Mock(group=self.makegroup('1.25', 'USD'))
        bitcoin(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        self.assertRegex(out, r'[\d\.]+ BTC')