astregs: add grant demand creation endpoint (#34593)
This commit is contained in:
parent
ef2925f7d3
commit
051b94d83b
|
@ -188,6 +188,49 @@ DOCUMENT_SCHEMA = {
|
|||
}
|
||||
}
|
||||
|
||||
GRANT_SCHEMA = {
|
||||
"$schema": "http://json-schema.org/draft-03/schema#",
|
||||
"title": "AstreGS grant",
|
||||
"description": "",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Libelle": {
|
||||
"type": "string",
|
||||
"required": True
|
||||
},
|
||||
"LibelleCourt": {
|
||||
"type": "string",
|
||||
"required": True
|
||||
},
|
||||
"ModGestion": {
|
||||
"type": "string",
|
||||
"required": True,
|
||||
"enum": ["1", "2", "3", "4"]
|
||||
},
|
||||
"TypeAide": {
|
||||
"type": "string",
|
||||
"required": True
|
||||
},
|
||||
"Sens": {
|
||||
"type": "string",
|
||||
"required": True
|
||||
},
|
||||
"CodeTiersDem": {
|
||||
"type": "string",
|
||||
"required": True
|
||||
},
|
||||
"CodeServiceGestionnaire": {
|
||||
"type": "string",
|
||||
"required": True
|
||||
},
|
||||
"CodeServiceUtilisateur": {
|
||||
"type": "string",
|
||||
"required": True
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AstreGS(BaseResource):
|
||||
wsdl_base_url = models.URLField(_('Webservices base URL'))
|
||||
username = models.CharField(_('Username'), max_length=32)
|
||||
|
@ -464,6 +507,22 @@ class AstreGS(BaseResource):
|
|||
return {'data': serialize_object(r)}
|
||||
|
||||
|
||||
@endpoint(name='create-grant-demand', perm='can_access',
|
||||
post={'description': _('Create grant demand'),
|
||||
'request_body': {
|
||||
'schema': {
|
||||
'application/json': GRANT_SCHEMA
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
def create_grant_demand(self, request, post_data):
|
||||
r = self.call('Dossier', 'Creation',
|
||||
Dossier=post_data
|
||||
)
|
||||
return {'data': serialize_object(r)}
|
||||
|
||||
|
||||
class Link(models.Model):
|
||||
resource = models.ForeignKey(AstreGS)
|
||||
name_id = models.CharField(max_length=32)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Body><ns0:creation xmlns:ns0="http://gfi.astre.webservices/rf/gf/contact"><ns0:request><ns0:Authentification><ns0:USERNOM>CS-FORML</ns0:USERNOM><ns0:USERPWD>G63mn9H2bJ</ns0:USERPWD></ns0:Authentification><ns0:Contexte><ns0:Organisme>CG06</ns0:Organisme><ns0:Budget>01</ns0:Budget><ns0:Exercice>2019</ns0:Exercice></ns0:Contexte><ns0:Contact><ns0:idContact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:CodeContact>AS207002</ns0:CodeContact><ns0:CodeTitreCivilite>035</ns0:CodeTitreCivilite><ns0:Nom>Mihai</ns0:Nom><ns0:Prenom>Serghei</ns0:Prenom><ns0:NomDeJeuneFille xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:DateDeNaissance xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:FormuleCivilite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:IntituleTitre2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:IntituleTitre3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:IntituleTitre4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:SituationDeFamille xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:CodeFonction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:LibelleFonction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:TelephoneBureau>01 43 35 01 35</ns0:TelephoneBureau><ns0:TelephoneMobile>0607080900</ns0:TelephoneMobile><ns0:NumeroDeFax xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:AdresseMail>smihai@entrouvert.com</ns0:AdresseMail><ns0:PageWeb>http://entrouvert.com</ns0:PageWeb><ns0:AdresseDestinataire xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:AdresseComplementaire xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:ComplementGeographique xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:RueVoie xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:ComplementVoie xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:CodePostal xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:Ville xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:CodePays xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:LibellePays xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:LibelleAdresse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/><ns0:Commentaire>Test création contact</ns0:Commentaire></ns0:Contact></ns0:request></ns0:creation></soap-env:Body></soap-env:Envelope>
|
|
@ -0,0 +1,307 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions name="Dossier" targetNamespace="http://gfi.astre.webservices/gad/dossier" xmlns:impl="http://gfi.astre.webservices/gad/dossier" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:intf="http://gfi.astre.webservices/gad/dossier">
|
||||
<wsdl:types>
|
||||
<schema elementFormDefault="qualified" targetNamespace="http://gfi.astre.webservices/gad/dossier" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- request et response -->
|
||||
|
||||
<complexType name="Authentification">
|
||||
<sequence>
|
||||
<element name="USERNOM" type="string"/>
|
||||
<element name="USERPWD" type="string"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<complexType name="Contexte">
|
||||
<sequence>
|
||||
<element name="Organisme" type="string"/>
|
||||
<element name="Budget" type="string"/>
|
||||
<element name="Exercice" type="string"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<complexType name="DossierRequest">
|
||||
<sequence>
|
||||
<element name="Authentification" type="impl:Authentification"/>
|
||||
<element name="Contexte" type="impl:Contexte"/>
|
||||
<element name="Dossier" type="impl:Dossier"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
<complexType name="DossierResponse">
|
||||
<sequence>
|
||||
<element name="DossierReturn" type="impl:Dossier"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<complexType name="Dossier">
|
||||
<sequence>
|
||||
<element name="CodeDossier" nillable="true" type="xsd:string"/>
|
||||
<element name="Exercice" nillable="true" type="xsd:string"/>
|
||||
<element name="GestionCourrier" nillable="true" type="xsd:string"/>
|
||||
<element name="ArticleLib" nillable="true" type="xsd:string"/>
|
||||
<element name="Libelle" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleCourt" nillable="true" type="xsd:string"/>
|
||||
<element name="ModGestion" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeSession" nillable="true" type="xsd:string"/>
|
||||
<element name="LicSession" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeDossierCommun" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleDossierCommun" nillable="true" type="xsd:string"/>
|
||||
<element name="DateSession" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeZonage" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleZonage" nillable="true" type="xsd:string"/>
|
||||
<element name="OpMere" nillable="true" type="xsd:string"/>
|
||||
<element name="PhMere" nillable="true" type="xsd:string"/>
|
||||
<element name="Phase" nillable="true" type="xsd:string"/>
|
||||
<element name="LicPhase" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeServiceGestionnaire" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleServiceGestionnaire" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeServiceUtilisateur" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleServiceUtilisateur" nillable="true" type="xsd:string"/>
|
||||
<element name="TypeAide" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeAide" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleAide" nillable="true" type="xsd:string"/>
|
||||
<element name="Sens" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeRegle" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleRegle" nillable="true" type="xsd:string"/>
|
||||
<element name="indAideNat" nillable="true" type="xsd:string"/>
|
||||
<element name="indAssoc" nillable="true" type="xsd:string"/>
|
||||
<element name="CodManif" nillable="true" type="xsd:string"/>
|
||||
<element name="LibManif" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeSection" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeTypeSubvention" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleTypeSubvention" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeTypeIntervention" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleTypeIntervention" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeTypeOperation" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleTypeOperation" nillable="true" type="xsd:string"/>
|
||||
<element name="IndicateurConvention" nillable="true" type="xsd:string"/>
|
||||
<element name="NbConventions" nillable="true" type="xsd:string"/>
|
||||
<element name="CodInstructeur" nillable="true" type="xsd:string"/>
|
||||
<element name="Instructeur" nillable="true" type="xsd:string"/>
|
||||
<element name="DateDecision" nillable="true" type="xsd:string"/>
|
||||
<element name="IndDebTrav" nillable="true" type="xsd:string"/>
|
||||
<element name="DateDebTrav" nillable="true" type="xsd:string"/>
|
||||
<element name="DateCaducite" nillable="true" type="xsd:string"/>
|
||||
<element name="NumGedelib" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeTiersDem" nillable="true" type="xsd:string"/>
|
||||
<element name="NomTiersDem" nillable="true" type="xsd:string"/>
|
||||
<element name="CodPostVilleDemandeur" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeTiersAttrib" nillable="true" type="xsd:string"/>
|
||||
<element name="NomTiersAttrib" nillable="true" type="xsd:string"/>
|
||||
<element name="CodPostVilleAttributaire" nillable="true" type="xsd:string"/>
|
||||
<element name="Maitre_oeuvre" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeProgramme" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleProgramme" nillable="true" type="xsd:string"/>
|
||||
<element name="ExEnv" nillable="true" type="xsd:string"/>
|
||||
<element name="NumEnveloppe" nillable="true" type="xsd:string"/>
|
||||
<element name="LigneCredit" nillable="true" type="xsd:string"/>
|
||||
<element name="Operation" nillable="true" type="xsd:string"/>
|
||||
<element name="LicOperation" nillable="true" type="xsd:string"/>
|
||||
<element name="TauxTVA" nillable="true" type="xsd:string"/>
|
||||
<element name="CoutTravauxHT" nillable="true" type="xsd:string"/>
|
||||
<element name="MontantVote" nillable="true" type="xsd:string"/>
|
||||
<element name="TauxVote" nillable="true" type="xsd:string"/>
|
||||
<element name="MontantDemande" nillable="true" type="xsd:string"/>
|
||||
<element name="TauxDemande" nillable="true" type="xsd:string"/>
|
||||
<element name="CoutTravauxTTC" nillable="true" type="xsd:string"/>
|
||||
<element name="MontantSubventionnable" nillable="true" type="xsd:string"/>
|
||||
<element name="MontantPropose" nillable="true" type="xsd:string"/>
|
||||
<element name="TauxPropose" nillable="true" type="xsd:string"/>
|
||||
<element name="Mandat" nillable="true" type="xsd:string"/>
|
||||
<element name="DateEnCours" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeStatut" nillable="true" type="xsd:string"/>
|
||||
<element name="InventTypInt" nillable="true" type="xsd:string"/>
|
||||
<element name="NumDemande" nillable="true" type="xsd:string"/>
|
||||
<element name="DemandesDePaiement" nillable="true" type="xsd:string"/>
|
||||
<element name="NoVersArc" nillable="true" type="xsd:string"/>
|
||||
<element name="CommDossier" nillable="true" type="xsd:string"/>
|
||||
<element name="IndDossierComplet" nillable="true" type="xsd:string"/>
|
||||
<element name="IId1" nillable="true" type="xsd:string"/>
|
||||
<element name="IId2" nillable="true" type="xsd:string"/>
|
||||
<element name="IId3" nillable="true" type="xsd:string"/>
|
||||
<element name="IId4" nillable="true" type="xsd:string"/>
|
||||
<element name="IId5" nillable="true" type="xsd:string"/>
|
||||
<element name="IId6" nillable="true" type="xsd:string"/>
|
||||
<element name="IId7" nillable="true" type="xsd:string"/>
|
||||
<element name="IId8" nillable="true" type="xsd:string"/>
|
||||
<element name="IId9" nillable="true" type="xsd:string"/>
|
||||
<element name="IId10" nillable="true" type="xsd:string"/>
|
||||
<element name="VId1" nillable="true" type="xsd:string"/>
|
||||
<element name="VId2" nillable="true" type="xsd:string"/>
|
||||
<element name="VId3" nillable="true" type="xsd:string"/>
|
||||
<element name="VId4" nillable="true" type="xsd:string"/>
|
||||
<element name="VId5" nillable="true" type="xsd:string"/>
|
||||
<element name="VId6" nillable="true" type="xsd:string"/>
|
||||
<element name="VId7" nillable="true" type="xsd:string"/>
|
||||
<element name="VId8" nillable="true" type="xsd:string"/>
|
||||
<element name="VId9" nillable="true" type="xsd:string"/>
|
||||
<element name="VId10" nillable="true" type="xsd:string"/>
|
||||
<element name="IndicateurHtSubventionnable" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeBudget" nillable="true" type="xsd:string"/>
|
||||
<element name="CodDossierAssocie" nillable="true" type="xsd:string"/>
|
||||
<element name="CodeExtranetDoss" nillable="true" type="xsd:string"/>
|
||||
<element name="LibCourrier1" nillable="true" type="xsd:string"/>
|
||||
<element name="LibCourrier2" nillable="true" type="xsd:string"/>
|
||||
<element name="LibelleTypeReunion" nillable="true" type="xsd:string"/>
|
||||
<element name="CommPret" nillable="true" type="xsd:string"/>
|
||||
<element name="NoBoiteArc" nillable="true" type="xsd:string"/>
|
||||
<element name="DateCreation" nillable="true" type="xsd:string"/>
|
||||
<element name="DateMaj" nillable="true" type="xsd:string"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<complexType name="Dossier_Cle">
|
||||
<sequence>
|
||||
<element name="CodeDossier" nillable="true" type="xsd:string"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<complexType name="DossierRequest_Cles">
|
||||
<sequence>
|
||||
<element name="Authentification" type="impl:Authentification"/>
|
||||
<element name="Contexte" type="impl:Contexte"/>
|
||||
<element name="DossierCle" type="impl:Dossier_Cle"/>
|
||||
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<element name="creation">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="request" type="impl:DossierRequest"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="creationResponse">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="response" type="impl:DossierResponse"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="modification">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="request" type="impl:DossierRequest"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="modificationResponse">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="response" type="impl:DossierResponse"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="chargement">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="request" type="impl:DossierRequest_Cles"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="chargementResponse">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="response" type="impl:DossierResponse"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
|
||||
</schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="chargementRequest">
|
||||
<wsdl:part name="request" element="impl:chargement">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="modificationResponse">
|
||||
<wsdl:part name="response" element="impl:modificationResponse">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="creationResponse">
|
||||
<wsdl:part name="response" element="impl:creationResponse">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="chargementResponse">
|
||||
<wsdl:part name="response" element="impl:chargementResponse">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="modificationRequest">
|
||||
<wsdl:part name="request" element="impl:modification">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="creationRequest">
|
||||
<wsdl:part name="request" element="impl:creation">
|
||||
</wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="Dossier">
|
||||
<wsdl:documentation>Web service des Dossier Astre </wsdl:documentation>
|
||||
<wsdl:operation name="Modification">
|
||||
<wsdl:documentation>
|
||||
le champ encodeKey est obligatoire ainsi que le champ à modifier
|
||||
</wsdl:documentation>
|
||||
<wsdl:input name="modificationRequest" message="impl:modificationRequest">
|
||||
</wsdl:input>
|
||||
<wsdl:output name="modificationResponse" message="impl:modificationResponse">
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="Chargement">
|
||||
<wsdl:documentation>
|
||||
le champ encodeKey est obligatoire
|
||||
</wsdl:documentation>
|
||||
<wsdl:input name="chargementRequest" message="impl:chargementRequest">
|
||||
</wsdl:input>
|
||||
<wsdl:output name="chargementResponse" message="impl:chargementResponse">
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="Creation">
|
||||
<wsdl:documentation>
|
||||
tous les champs sont obligatoires
|
||||
</wsdl:documentation>
|
||||
<wsdl:input name="creationRequest" message="impl:creationRequest">
|
||||
</wsdl:input>
|
||||
<wsdl:output name="creationResponse" message="impl:creationResponse">
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="DossierSoapBinding" type="impl:Dossier">
|
||||
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<wsdl:operation name="Modification">
|
||||
<wsdlsoap:operation soapAction=""/>
|
||||
<wsdl:input name="modificationRequest">
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="modificationResponse">
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="Creation">
|
||||
<wsdlsoap:operation soapAction=""/>
|
||||
<wsdl:input name="creationRequest">
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="creationResponse">
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="Chargement">
|
||||
<wsdlsoap:operation soapAction=""/>
|
||||
<wsdl:input name="chargementRequest">
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="chargementResponse">
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="Dossier">
|
||||
<wsdl:port name="Dossier" binding="impl:DossierSoapBinding">
|
||||
<wsdlsoap:address location="http://10.1.20.153:28001/axis2/services/Dossier/"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
|
@ -0,0 +1 @@
|
|||
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns1:creationResponse xmlns:ns1="http://gfi.astre.webservices/gad/dossier"><ns1:response><ns1:DossierReturn><ns1:CodeDossier>2019_06407</ns1:CodeDossier><ns1:Exercice>2019</ns1:Exercice><ns1:GestionCourrier></ns1:GestionCourrier><ns1:ArticleLib></ns1:ArticleLib><ns1:Libelle>test grant demand</ns1:Libelle><ns1:LibelleCourt>test</ns1:LibelleCourt><ns1:ModGestion>1</ns1:ModGestion><ns1:CodeSession></ns1:CodeSession><ns1:LicSession xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" /><ns1:CodeDossierCommun></ns1:CodeDossierCommun><ns1:LibelleDossierCommun></ns1:LibelleDossierCommun><ns1:DateSession xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" /><ns1:CodeZonage></ns1:CodeZonage><ns1:LibelleZonage></ns1:LibelleZonage><ns1:OpMere xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" /><ns1:PhMere xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" /><ns1:Phase></ns1:Phase><ns1:LicPhase></ns1:LicPhase><ns1:CodeServiceGestionnaire>SGG</ns1:CodeServiceGestionnaire><ns1:LibelleServiceGestionnaire>Direction de l&#39;éducation, du sport et de la culture</ns1:LibelleServiceGestionnaire><ns1:CodeServiceUtilisateur>SUG4</ns1:CodeServiceUtilisateur><ns1:LibelleServiceUtilisateur>SPORTS ET JEUNESSE</ns1:LibelleServiceUtilisateur><ns1:TypeAide>F</ns1:TypeAide><ns1:CodeAide>030105</ns1:CodeAide><ns1:LibelleAide>Actions culturelles - Etab publics locaux</ns1:LibelleAide><ns1:Sens>D</ns1:Sens><ns1:CodeRegle></ns1:CodeRegle><ns1:LibelleRegle></ns1:LibelleRegle><ns1:indAideNat></ns1:indAideNat><ns1:indAssoc></ns1:indAssoc><ns1:CodManif></ns1:CodManif><ns1:LibManif></ns1:LibManif><ns1:CodeSection></ns1:CodeSection><ns1:CodeTypeSubvention></ns1:CodeTypeSubvention><ns1:LibelleTypeSubvention></ns1:LibelleTypeSubvention><ns1:CodeTypeIntervention></ns1:CodeTypeIntervention><ns1:LibelleTypeIntervention></ns1:LibelleTypeIntervention><ns1:CodeTypeOperation></ns1:CodeTypeOperation><ns1:LibelleTypeOperation></ns1:LibelleTypeOperation><ns1:IndicateurConvention>0</ns1:IndicateurConvention><ns1:NbConventions>0</ns1:NbConventions><ns1:CodInstructeur></ns1:CodInstructeur><ns1:Instructeur></ns1:Instructeur><ns1:DateDecision></ns1:DateDecision><ns1:IndDebTrav></ns1:IndDebTrav><ns1:DateDebTrav></ns1:DateDebTrav><ns1:DateCaducite></ns1:DateCaducite><ns1:NumGedelib></ns1:NumGedelib><ns1:CodeTiersDem>487463</ns1:CodeTiersDem><ns1:NomTiersDem>My Tiers</ns1:NomTiersDem><ns1:CodPostVilleDemandeur></ns1:CodPostVilleDemandeur><ns1:CodeTiersAttrib></ns1:CodeTiersAttrib><ns1:NomTiersAttrib xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" /><ns1:CodPostVilleAttributaire xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" /><ns1:Maitre_oeuvre></ns1:Maitre_oeuvre><ns1:CodeProgramme></ns1:CodeProgramme><ns1:LibelleProgramme></ns1:LibelleProgramme><ns1:ExEnv></ns1:ExEnv><ns1:NumEnveloppe></ns1:NumEnveloppe><ns1:LigneCredit></ns1:LigneCredit><ns1:Operation></ns1:Operation><ns1:LicOperation></ns1:LicOperation><ns1:TauxTVA></ns1:TauxTVA><ns1:CoutTravauxHT></ns1:CoutTravauxHT><ns1:MontantVote></ns1:MontantVote><ns1:TauxVote></ns1:TauxVote><ns1:MontantDemande></ns1:MontantDemande><ns1:TauxDemande></ns1:TauxDemande><ns1:CoutTravauxTTC></ns1:CoutTravauxTTC><ns1:MontantSubventionnable></ns1:MontantSubventionnable><ns1:MontantPropose></ns1:MontantPropose><ns1:TauxPropose></ns1:TauxPropose><ns1:Mandat>0,00</ns1:Mandat><ns1:DateEnCours>11/07/2019</ns1:DateEnCours><ns1:CodeStatut>ENR</ns1:CodeStatut><ns1:InventTypInt></ns1:InventTypInt><ns1:NumDemande></ns1:NumDemande><ns1:DemandesDePaiement>0,00</ns1:DemandesDePaiement><ns1:NoVersArc></ns1:NoVersArc><ns1:CommDossier></ns1:CommDossier><ns1:IndDossierComplet>0</ns1:IndDossierComplet><ns1:IId1></ns1:IId1><ns1:IId2></ns1:IId2><ns1:IId3></ns1:IId3><ns1:IId4></ns1:IId4><ns1:IId5></ns1:IId5><ns1:IId6></ns1:IId6><ns1:IId7></ns1:IId7><ns1:IId8></ns1:IId8><ns1:IId9></ns1:IId9><ns1:IId10></ns1:IId10><ns1:VId1></ns1:VId1><ns1:VId2></ns1:VId2><ns1:VId3></ns1:VId3><ns1:VId4></ns1:VId4><ns1:VId5></ns1:VId5><ns1:VId6></ns1:VId6><ns1:VId7></ns1:VId7><ns1:VId8></ns1:VId8><ns1:VId9></ns1:VId9><ns1:VId10></ns1:VId10><ns1:IndicateurHtSubventionnable>1</ns1:IndicateurHtSubventionnable><ns1:CodeBudget>01</ns1:CodeBudget><ns1:CodDossierAssocie></ns1:CodDossierAssocie><ns1:CodeExtranetDoss></ns1:CodeExtranetDoss><ns1:LibCourrier1></ns1:LibCourrier1><ns1:LibCourrier2></ns1:LibCourrier2><ns1:LibelleTypeReunion></ns1:LibelleTypeReunion><ns1:CommPret></ns1:CommPret><ns1:NoBoiteArc></ns1:NoBoiteArc><ns1:DateCreation>11/07/2019</ns1:DateCreation><ns1:DateMaj></ns1:DateMaj></ns1:DossierReturn></ns1:response></ns1:creationResponse></soapenv:Body></soapenv:Envelope>
|
|
@ -347,3 +347,42 @@ def test_create_document(mocked_post, mocked_get, connector, app):
|
|||
assert resp.json['data']
|
||||
assert resp.json['data']['RefDocument'] == '111'
|
||||
assert resp.json['data']['NumVersion'] == '1'
|
||||
|
||||
|
||||
@mock.patch('passerelle.utils.Request.get')
|
||||
@mock.patch('passerelle.utils.Request.post')
|
||||
def test_create_grant_demand(mocked_post, mocked_get, connector, app):
|
||||
mocked_get.return_value = mock.Mock(content=get_xml_file('Dossier.wsdl'))
|
||||
mocked_post.return_value = mock.Mock(content=get_xml_file('DossierCreationResponse.xml'),
|
||||
headers={'Content-Type': 'text/xml'},
|
||||
status_code=200)
|
||||
payload = {
|
||||
'Libelle': 'test grant demand',
|
||||
'LibelleCourt': 'test',
|
||||
'ModGestion': '1',
|
||||
'TypeAide': 'F',
|
||||
'Sens': 'D',
|
||||
'CodeTiersDem': '487473',
|
||||
'CodeServiceGestionnaire': 'SGG',
|
||||
'CodeAide': '030105',
|
||||
'CodeServiceUtilisateur': '030105',
|
||||
}
|
||||
resp = app.post_json('/astregs/test/create-grant-demand', params=payload)
|
||||
assert resp.json['data']
|
||||
data = resp.json['data']
|
||||
assert data['CodeDossier'] =='2019_06407'
|
||||
assert data['Exercice'] == '2019'
|
||||
assert data['Libelle'] == 'test grant demand'
|
||||
assert data['LibelleCourt'] == 'test'
|
||||
assert data['ModGestion'] == '1'
|
||||
assert data['CodeServiceGestionnaire'] == 'SGG'
|
||||
assert data['CodeServiceUtilisateur'] == 'SUG4'
|
||||
assert data['LibelleServiceUtilisateur'] == 'SPORTS ET JEUNESSE'
|
||||
assert data['TypeAide'] == 'F'
|
||||
assert data['CodeAide'] == '030105'
|
||||
assert data['LibelleAide'] == 'Actions culturelles - Etab publics locaux'
|
||||
assert data['Sens'] == 'D'
|
||||
assert data['CodeTiersDem'] == '487463'
|
||||
assert data['NomTiersDem'] == 'My Tiers'
|
||||
assert data['CodeStatut'] == 'ENR'
|
||||
assert data['DateCreation'] == '11/07/2019'
|
||||
|
|
Loading…
Reference in New Issue