コード例 #1
0
 def test_success(self):
     new_ti = copy.deepcopy(self.trust_indicator)
     new_ti.current += self.update_step
     new_ti.histories.append(
         result_models.TIHistory(self.update_date, self.update_step))
     new_data = copy.deepcopy(self.req_d)
     new_data.trust_indicator = new_ti
     update = result_models.ResultUpdateRequest(trust_indicator=new_ti)
     self.update_req = new_data
     return update, self.req_d_id
コード例 #2
0
ファイル: test_result.py プロジェクト: boucherv/releng
    def test_success(self):
        _id = self._create_d()

        new_ti = copy.deepcopy(self.trust_indicator)
        new_ti.current += self.update_step
        new_ti.histories.append(
            result_models.TIHistory(self.update_date, self.update_step))
        new_data = copy.deepcopy(self.req_d)
        new_data.trust_indicator = new_ti
        update = result_models.ResultUpdateRequest(trust_indicator=new_ti)
        code, body = self.update(update, _id)
        self.assertEqual(_id, body._id)
        self.assert_res(code, body, new_data)

        code, new_body = self.get(_id)
        self.assertEqual(_id, new_body._id)
        self.assert_res(code, new_body, new_data)