Skip to content
Snippets Groups Projects
Commit 30c30ffb authored by Petr Kalashnikov's avatar Petr Kalashnikov
Browse files

Remove redundant test with fixture

parent 223dfedd
No related branches found
No related tags found
1 merge request!7OM46, del 1: Support batch_complete endpoint from setra
Pipeline #57099 failed
......@@ -31,14 +31,10 @@ class BaseModel(pydantic.BaseModel):
return cls.from_dict(data)
class Transaction(BaseModel):
id: Optional[str]
voucher_id: Optional[str]
created: Optional[datetime.datetime]
account: str
amount: float
transdate: Optional[datetime.datetime]
transdate: Optional[datetime.date]
curamount: Optional[float]
currency: Optional[str]
description: str
......@@ -56,36 +52,18 @@ class Transaction(BaseModel):
class Voucher(BaseModel):
id: Optional[str]
batch_id: Optional[str]
created: Optional[datetime.datetime]
voucherdate: Optional[datetime.datetime]
voucherdate: Optional[datetime.date]
exref: Optional[str]
voucherno: int
voucherno_ubw: Optional[str]
voucherno_ubw_wflow: Optional[str]
vouchertype: Optional[str]
transactions: typing.List[Transaction]
class Batch(BaseModel):
"""Model representing a batch, with a list of vouchers (and each voucher has a list of transactions)"""
client: str
created: Optional[datetime.datetime]
batchid: str
period: str
interface: str
vouchertype: typing.Optional[str]
vouchers: typing.List[Voucher]
batch_validated_ok_date: Optional[datetime.datetime]
batch_rejected_code: Optional[str]
sent_date: Optional[datetime.datetime]
http_response_content: Optional[str]
http_response_code: Optional[datetime.datetime]
orderno: Optional[datetime.datetime]
polling_statuscode: Optional[str]
polling_statuscode_date: Optional[datetime.datetime]
getresult_date: Optional[datetime.datetime]
getresult_statuscode: Optional[str]
getresult_logg: Optional[str]
getresult_report: Optional[str]
......@@ -82,7 +82,3 @@ def batch_with_voucher_fixture():
def batch_fail_fixture():
return load_json_file('batch_fail_fixture.json')
@pytest.fixture
def batch_complete_fixture():
return load_json_file('batch_complete_fixture.json')
{
"created": "2020-01-01T00:00:00Z",
"batchid": "252",
"period": 201902,
"interface": "HB",
"client": "72",
"vouchertype": "3",
"batch_validated_ok_date": null,
"batch_rejected_code": "",
"sent_date": null,
"http_response_content": "",
"http_response_code": null,
"orderno": null,
"polling_statuscode": "1",
"polling_statuscode_date": null,
"getresult_date": null,
"getresult_statuscode": "1",
"getresult_logg": "",
"getresult_report": "",
"vouchers": [
{
"id": 252,
"batch_id": 252,
"created": "2020-01-01T00:00:00Z",
"voucherdate": "2020-01-01T00:00:00Z",
"exref": "",
"voucherno": 252,
"voucherno_ubw": null,
"voucherno_ubw_wflow": null,
"vouchertype": "HB",
"transactions": [
{
"id": 3,
"voucher_id": 252,
"created": "2020-01-01T00:00:00Z",
"account": "72",
"amount": 50.0,
"transdate": "2020-01-01T00:00:00Z",
"curamount": 50.0,
"currency": "NOK",
"description": "50 NOK into 72",
"dim1": "",
"dim2": "",
"dim3": "",
"dim4": "",
"dim5": "",
"dim6": "",
"dim7": "",
"sequenceno": 1,
"taxcode": "MVA",
"transtype": "GL",
"extinvref": ""
},
{
"id": 4,
"voucher_id": 252,
"created": "2020-01-01T00:00:00Z",
"account": "72",
"amount": 50.0,
"transdate": "2020-01-01T00:00:00Z",
"curamount": 50.0,
"currency": "NOK",
"description": "50 NOK into 72",
"dim1": "",
"dim2": "",
"dim3": "",
"dim4": "",
"dim5": "",
"dim6": "",
"dim7": "",
"sequenceno": 1,
"taxcode": "MVA",
"transtype": "GL",
"extinvref": ""
}
]
}
]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment