<commit_before>from money_conversion.money import Money
import unittest


class MoneyClassTest(unittest.TestCase):
    def setUp(self):
        self.twenty_euro = Money(20, 'EUR')

    def test_convert_euro_to_usd(self):
        twenty_usd = self.twenty_euro.to_usd()

        self.assertIsInstance(twenty_usd, Money)
        self.assertEqual('USD', twenty_usd.currency)
        self.assertEqual(21.8, twenty_usd.amount)

    def test_convert_euro_to_brl(self):
        twenty_brl = self.twenty_euro.to_brl()

        self.assertIsInstance(twenty_brl, Money)
        self.assertEqual('BRL', twenty_brl.currency)
        self.assertEqual(85, twenty_brl.amount)


if __name__ == '__main__':
    unittest.main()<commit_msg>Add test that validates method call<commit_after>from money_conversion.money import Money
import unittest


class MoneyClassTest(unittest.TestCase):
    def setUp(self):
        self.twenty_euro = Money(20, 'EUR')

    def test_convert_euro_to_usd(self):
        twenty_usd = self.twenty_euro.to_usd()

        self.assertIsInstance(twenty_usd, Money)
        self.assertEqual('USD', twenty_usd.currency)
        self.assertEqual(21.8, twenty_usd.amount)

    def test_convert_euro_to_brl(self):
        twenty_brl = self.twenty_euro.to_brl()

        self.assertIsInstance(twenty_brl, Money)
        self.assertEqual('BRL', twenty_brl.currency)
        self.assertEqual(85, twenty_brl.amount)


    def test_invalid_method_pattern_call(self):
        with self.assertRaises(AttributeError):
            twenty_brl = self.twenty_euro.batman()


if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.1005586592178771, 'fraction_numerical': 0.008690254500310366, 'mean_word_length': 3.5795454545454546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6354578', 'n_tokens_mistral': 570, 'n_tokens_neox': 548, 'n_words': 84}