def test_export_cert_artifacts_to_dir_incorrect_id_invalid(self, mock_chk_dir): """ Test API export_cert_artifacts_to_dir raises exception when invalid id used """ cert_util = EdgeCertUtil() with self.assertRaises(edgectl.errors.EdgeValueError): mock_chk_dir.return_value = True cert_util.export_cert_artifacts_to_dir('root', 'some_dir')
def test_export_cert_artifacts_to_dir_invalid_dir_invalid(self, mock_chk_dir): """ Test API export_cert_artifacts_to_dir raises exception when invalid id used """ cert_util = EdgeCertUtil() cert_util.create_root_ca_cert('root', subject_dict=VALID_SUBJECT_DICT) with self.assertRaises(edgectl.errors.EdgeValueError): mock_chk_dir.return_value = False cert_util.export_cert_artifacts_to_dir('root', 'some_dir')