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)
Esempio n. 3
0
 def add_entry(self, database):
     DatabaseHandler.add_noun(self, database)
Esempio n. 4
0
 def add_entry(self, database):
     DatabaseHandler.add_noun(self, database)