class TestSpellchecker(unittest.TestCase):
    def setUp(self):
        word = Word('abacaxi', 'SYSTEM-TEST')
        word.save()

        self.spellchecker = Spellchecker('pt_BR.list')

    def test_correct(self):
        self.assertEqual('abacaxi', self.spellchecker.correct('abacahi'))

    def test_if_correct(self):
        self.assertEqual('abacaxi', self.spellchecker.correct('abacaxi'))

    def test_candidates(self):
        self.assertEqual(set(['abacaxi']), self.spellchecker.candidates('abacahi'))
class TestSpellchecker(unittest.TestCase):
    def setUp(self):
        word = Word('abacaxi', 'SYSTEM-TEST')
        word.save()

        self.spellchecker = Spellchecker('pt_BR.list')

    def test_correct(self):
        self.assertEqual('abacaxi', self.spellchecker.correct('abacahi'))

    def test_if_correct(self):
        self.assertEqual('abacaxi', self.spellchecker.correct('abacaxi'))

    def test_candidates(self):
        self.assertEqual(set(['abacaxi']),
                         self.spellchecker.candidates('abacahi'))
    def setUp(self):
        word = Word('abacaxi', 'SYSTEM-TEST')
        word.save()

        self.spellchecker = Spellchecker('pt_BR.list')
    def setUp(self):
        word = Word('abacaxi', 'SYSTEM-TEST')
        word.save()

        self.spellchecker = Spellchecker('pt_BR.list')