+ def test_update_vnf_etag_not_match(self):
+ instanceid = "19"
+ NfInstModel(nfinstid=instanceid,
+ nf_name='VNF1',
+ nf_desc="VNF DESC",
+ vnfdid="1",
+ netype="XGW",
+ vendor="ZTE",
+ vnfSoftwareVersion="V1",
+ version="V1",
+ package_id="2",
+ status='INSTANTIATED').save()
+ rc = RequestsClient()
+ response = rc.patch("http://localhost:8801/api/vnflcm/v1/vnf_instances/19",
+ json=self.upd_data,
+ headers={
+ "Accept": "application/json",
+ "Content-Type": "application/json",
+ "If-Match": "test_etag"
+ })
+ NfInstModel.objects.filter(nfinstid=instanceid).delete()
+ self.failUnlessEqual(status.HTTP_412_PRECONDITION_FAILED, response.status_code)
+