def test_schedule_delete(self): dbservices = ScheduleDBServices() dbservices.openConnection() dbservices.createEmpSchedules() dbservices.insert(sch, "testuser") dbservices.delete("testuser", sch) newSch = dbservices.get("testuser") self.assertIsNull(newSch.getId())
def deleteScheduleAction(request): username = request.GET['username'] date = request.GET['date'] db = ScheduleDBServices() db.open() db.delete(username, date) db.close() return render(request, 'ScheduleManager.html')