def test_CaseClosure(self): core.close_case(self.conn, 'P100', 'S100') self.cur.execute("SELECT Data_zamkniecia FROM sprawy WHERE Sprawa=%s", ('S100',)) (closure_date,) = self.cur.fetchone() now = datetime.datetime.now() today = datetime.date(now.year, now.month, now.day) self.assertEqual(closure_date, today)
def test_NoSuchCase(self): with self.assertRaises(core.NoSuchCaseError): core.close_case(self.conn, 'P100', 'S101')