Skip to content

Commit 407cbd9

Browse files
author
Vignesh Kennadi
committed
removed unused imports
1 parent 2130ca9 commit 407cbd9

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

tests/accounting/api/test_accounting_api.py

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import filecmp
44
from decimal import Decimal
55
from pathlib import Path
6-
from pydoc import pager
76

87
import pytest
9-
from black import nullcontext
108
from dateutil import tz
119

1210
from xero_python.accounting import (
@@ -347,9 +345,9 @@ def test_get_invoices(sandbox_accounting_api: AccountingApi, xero_tenant_id):
347345
expected = Invoices (
348346
invoices=[
349347
Invoice(
350-
amount_credited = Decimal("0"),
351-
amount_due = Decimal("0"),
352-
amount_paid= Decimal("0"),
348+
amount_credited = Decimal(0),
349+
amount_due = Decimal(0),
350+
amount_paid= Decimal(0),
353351
contact=Contact(
354352
addresses=[],
355353
contact_groups=[],
@@ -379,16 +377,16 @@ def test_get_invoices(sandbox_accounting_api: AccountingApi, xero_tenant_id):
379377
repeating_invoice_id="428c0d75-909f-4b04-8403-a48dc27283b0",
380378
sent_to_contact=True,
381379
status="VOIDED",
382-
sub_total=Decimal("40"),
383-
total=Decimal("40"),
384-
total_tax=Decimal("0"),
380+
sub_total=Decimal(40),
381+
total=Decimal(40),
382+
total_tax=Decimal(0),
385383
type="ACCREC",
386384
updated_date_utc=datetime.datetime(2018, 11, 2, 16, 31, 30, 160000, tzinfo=tz.UTC),
387385
),
388386
Invoice(
389-
amount_credited=Decimal("0"),
390-
amount_due=Decimal("0"),
391-
amount_paid=Decimal("46"),
387+
amount_credited=Decimal(0),
388+
amount_due=Decimal(0),
389+
amount_paid=Decimal(46),
392390
contact=Contact(
393391
addresses=[],
394392
contact_groups=[],
@@ -415,7 +413,7 @@ def test_get_invoices(sandbox_accounting_api: AccountingApi, xero_tenant_id):
415413
overpayments=[],
416414
payments=[
417415
Payment(
418-
amount=Decimal("46"),
416+
amount=Decimal(46),
419417
currency_rate=Decimal(1),
420418
date=datetime.date(2018, 11, 29),
421419
has_account=False,
@@ -428,16 +426,16 @@ def test_get_invoices(sandbox_accounting_api: AccountingApi, xero_tenant_id):
428426
#repeating_invoice_id="428c0d75-909f-4b04-8403-a48dc27283b0",
429427
sent_to_contact=True,
430428
status="PAID",
431-
sub_total=Decimal("40"),
432-
total=Decimal("46"),
433-
total_tax=Decimal("6"),
429+
sub_total=Decimal(40),
430+
total=Decimal(46),
431+
total_tax=Decimal(6),
434432
type="ACCREC",
435433
updated_date_utc=datetime.datetime(2018, 11, 2, 16, 36, 32, 690000, tzinfo=tz.UTC),
436434
),
437435
Invoice(
438436
amount_credited=Decimal(0),
439437
amount_due=Decimal(115),
440-
amount_paid=Decimal("0"),
438+
amount_paid=Decimal(0),
441439
contact=Contact(
442440
addresses=[],
443441
contact_groups=[],
@@ -465,9 +463,9 @@ def test_get_invoices(sandbox_accounting_api: AccountingApi, xero_tenant_id):
465463
prepayments=[],
466464
reference="",
467465
status="AUTHORISED",
468-
sub_total=Decimal("100"),
469-
total=Decimal("115"),
470-
total_tax=Decimal("15"),
466+
sub_total=Decimal(100),
467+
total=Decimal(115),
468+
total_tax=Decimal(15),
471469
type="ACCREC",
472470
updated_date_utc=datetime.datetime(2018, 11, 2, 16, 37, 28, 927000, tzinfo=tz.UTC)
473471
)

0 commit comments

Comments
 (0)