litteralis: do not send microseconds (#87648)
gitea/passerelle/pipeline/head This commit looks good
Details
gitea/passerelle/pipeline/head This commit looks good
Details
This commit is contained in:
parent
b35b0fccd3
commit
f7f848af82
|
@ -39,7 +39,7 @@ def parse_datetime(datetime_str):
|
|||
raise APIError('Invalid datetime: %s' % datetime_str)
|
||||
if obj is None:
|
||||
raise APIError('Invalid datetime format: %s' % datetime_str)
|
||||
return obj
|
||||
return obj.replace(microsecond=0)
|
||||
|
||||
|
||||
class Litteralis(BaseResource, HTTPResource):
|
||||
|
|
|
@ -37,7 +37,7 @@ def test_demandes_recues(app, connector, geom):
|
|||
params = {
|
||||
'fournisseur': 'the-fournisseur',
|
||||
'idDemande': '12-34',
|
||||
'dateEnvoi': '2022-10-03T12:43:18',
|
||||
'dateEnvoi': '2022-10-03T12:43:18.123456+02:00',
|
||||
'typeModele': 'DA',
|
||||
'demandeur': {
|
||||
'raisonSociale': 'the-world-company',
|
||||
|
@ -69,7 +69,7 @@ def test_demandes_recues(app, connector, geom):
|
|||
req = rsps.calls[0].request
|
||||
assert req.headers['Content-Type'] == 'application/json'
|
||||
json_req = json.loads(req.body)
|
||||
assert json_req['dateEnvoi'] == '2022-10-03T12:43:18+00:00'
|
||||
assert json_req['dateEnvoi'] == '2022-10-03T12:43:18+02:00'
|
||||
assert json_req['geom']['coordinates'] == [48.866667, 2.333333]
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ def test_demandes_recues_clean_empty_fields(app, connector):
|
|||
params = {
|
||||
'fournisseur': 'the-fournisseur',
|
||||
'idDemande': '12-34',
|
||||
'dateEnvoi': '2022-10-03T12:43:18',
|
||||
'dateEnvoi': '2022-10-03T12:43:18.123456+02:00',
|
||||
'typeModele': 'DA',
|
||||
'demandeur': {
|
||||
'raisonSociale': 'the-world-company',
|
||||
|
@ -137,7 +137,7 @@ def test_demandes_recues_bad_coordinate(app, connector, geom, err_desc):
|
|||
params = {
|
||||
'fournisseur': 'the-fournisseur',
|
||||
'idDemande': '12-34',
|
||||
'dateEnvoi': '2022-10-03T12:43:18',
|
||||
'dateEnvoi': '2022-10-03T12:43:18.123456+02:00',
|
||||
'typeModele': 'DA',
|
||||
'demandeur': {
|
||||
'raisonSociale': 'the-world-company',
|
||||
|
|
Loading…
Reference in New Issue