Exemplo n.º 1
0
 def test_when_id_not_in_db(self):
     with DB.Connect() as cursor:
         row = DB.get_entry_row(cursor, 2)
     self.assertIsNone(row)
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
 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))