Пример #1
0
 def test_if_tag_filter_works(self):
     with DB.Connect() as cursor:
         result = list(DB.get_all_entries_with_comments(cursor, tag='testtag2'))
         self.assertEqual(1, len(result))
Пример #2
0
 def test_if_return_is_correct(self):
     with DB.Connect() as cursor:
         result = list(DB.get_all_entries_with_comments(cursor))
         self.assertEqual(2, len(result))
         for entry in result:
             self.assertEqual(3, len(list(entry.comments)))