示例#1
0
    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())
示例#2
0
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')