def test_when_id_not_in_db(self): with DB.Connect() as cursor: row = DB.get_entry_row(cursor, 2) self.assertIsNone(row)
def test_when_cursor_not_passed(self): with DB.Connect() as cursor: DB.insert_one(cursor, self.entry) row = DB.get_entry_row(1) self.assertEqual(row, tuple(self.entry))
def test_if_row_returned(self): with DB.Connect() as cursor: DB.insert_one(cursor, self.entry) row = DB.get_entry_row(cursor, 1) self.assertEqual(row, tuple(self.entry))