Beispiel #1
0
    def test_update_job(self):
        repo = Repo(dal.session)
        job1 = repo.get_incartjob(id='1')
        job1.doctor_id = 1
        ok: bool = repo.update_incartjob(job1)

        self.assertTrue(ok)
        job2 = repo.get_incartjob(id='1')
        self.assertEqual(job2.doctor_id, 1)
Beispiel #2
0
 def update_job(self, job: IncartJob) -> bool:
     self.log_info("run: update_job")
     repo = Repo(self.dal.session)
     ok: bool = repo.update_incartjob(job)
     self.log_info(f"run: update_job, result={ok}")
     return ok