text: 
  from src.dictionary import Dictionary
  import unittest
  import sys
  import os
  
  class TestWorldMap(unittest.TestCase):
  
      def test_load_words(self):
          dictionary = Dictionary()
          filedir = os.path.dirname(os.path.realpath('__file__'))
  
          filename = os.path.join(filedir, "tests/dictionary.json")
          try:
              dictionary.load_words(filename)
          except Exception as e:
              self.assertTrue(False)
  
          self.assertTrue(len(dictionary.verbs), 3)
          self.assertTrue(len(dictionary.nouns), 3)
          self.assertTrue(len(dictionary.adverbs), 4)
          self.assertTrue(len(dictionary.prepositions), 3)
          self.assertTrue(len(dictionary.adjectives), 1)
          self.assertTrue(len(dictionary.articles), 3)
  
      def test_words(self):
          dictionary = Dictionary()
          filedir = os.path.dirname(os.path.realpath('__file__'))
  
          filename = os.path.join(filedir, "tests/dictionary.json")
          dictionary.load_words(filename)
  
          words = dictionary.words
  
          self.assertTrue(len(words), 16)
  
      def test_get_part_of_speech(self):
          dictionary = Dictionary()
          filedir = os.path.dirname(os.path.realpath('__file__'))
  
          filename = os.path.join(filedir, "tests/dictionary.json")
          dictionary.load_words(filename)
  
          pos = dictionary.get_part_of_speech("torch")
          self.assertEqual(pos, "noun")
  