def test_user_search(self): result = user_search('Jay') compare = Entry.select().where(Entry.user.contains('Jay')) self.assertEqual(len(result), len(compare))
def test_date_list_search(self): result = date_search(['12/12/2002', '13/12/2002', '14/12/2002']) compare = Entry.select().where(Entry.date.contains('12/12/2002')) self.assertEqual(len(result), len(compare))
def test_edit_notes(self): result = edit_notes_query('Tidying up!', 1) compare = Entry.select().where(Entry.id == 1).get() self.assertEqual(result.id, compare.id)
def test_edit_time(self): result = edit_time_query(35, 1) compare = Entry.select().where(Entry.id == 1).get() self.assertEqual(result.id, compare.id)
def test_edit_date(self): result = edit_date_query('12/10/2003', 1) compare = Entry.select().where(Entry.id == 1).get() self.assertEqual(result.id, compare.id)
def test_edit_value(self, mock_input): result = edit_value(self.entry_id, 'Title', get_title, edit_title_query) compare = Entry.select().where(Entry.title.contains('Rolling in the dough')).get() self.assertEqual(result.id, compare.id)