- with self.assertRaises(EngineException, msg="Accepted non-existent charm in VNF configuration") as e:
- self.topic.upload_content(fake_session, did, test_vnfd, {}, {"Content-Type": []})
- self.assertEqual(e.exception.http_code, HTTPStatus.BAD_REQUEST, "Wrong HTTP status code")
- self.assertIn(norm("{} defined in vnf[id={}] but not present in package".format("charm", test_vnfd["id"])),
- norm(str(e.exception)), "Wrong exception text")
- del test_vnfd["df"][0]["lcm-operations-configuration"]["operate-vnf-op-config"]["day1-2"][0]["juju"]
- with self.subTest(i=6, t='Check Input Validation: mgmt-cp'):
+ with self.assertRaises(
+ EngineException, msg="Accepted non-existent charm in VNF configuration"
+ ) as e:
+ self.topic.upload_content(
+ fake_session, did, test_vnfd, {}, {"Content-Type": []}
+ )
+ print(str(e.exception))
+ self.assertEqual(
+ e.exception.http_code, HTTPStatus.BAD_REQUEST, "Wrong HTTP status code"
+ )
+ self.assertIn(
+ norm(
+ "{} defined in vnf[id={}] but not present in package".format(
+ "charm", test_vnfd["id"]
+ )
+ ),
+ norm(str(e.exception)),
+ "Wrong exception text",
+ )
+ del test_vnfd["df"][0]["lcm-operations-configuration"][
+ "operate-vnf-op-config"
+ ]["day1-2"][0]["execution-environment-list"][0]["juju"]
+ with self.subTest(i=6, t="Check Input Validation: mgmt-cp"):