def test_add_noun_and_delete(self):
     handler = DatabaseHandler()
     test_noun = Noun({'Entry': 'xyz', 'Gender': 'das',
                       'Plural': 'Beispiele', 'Genetive': 'Beispieles',
                       'Meaning': 'example', 'Examples': 'Too lazy'})
     self.assertEqual(handler.exists_entry('xyz', DATABASE), False)
     handler.add_noun(test_noun, DATABASE)
     self.assertEqual(handler.exists_entry('xyz', DATABASE), True)
     handler.delete_entry('xyz', DATABASE)
     self.assertEqual(handler.exists_entry('xyz', DATABASE), False)
 def test_add_noun_and_delete(self):
     handler = DatabaseHandler()
     test_noun = Noun({
         'Entry': 'xyz',
         'Gender': 'das',
         'Plural': 'Beispiele',
         'Genetive': 'Beispieles',
         'Meaning': 'example',
         'Examples': 'Too lazy'
     })
     self.assertEqual(handler.exists_entry('xyz', DATABASE), False)
     handler.add_noun(test_noun, DATABASE)
     self.assertEqual(handler.exists_entry('xyz', DATABASE), True)
     handler.delete_entry('xyz', DATABASE)
     self.assertEqual(handler.exists_entry('xyz', DATABASE), False)
Example #3
0
 def add_entry(self, database):
     DatabaseHandler.add_noun(self, database)
Example #4
0
 def add_entry(self, database):
     DatabaseHandler.add_noun(self, database)