Skip to content

Commit aff3f74

Browse files
author
Marian Ganisin
committed
User correct attributes in InvoiceState enum
1 parent 59be331 commit aff3f74

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/integration/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def account_plan(account_plans_params, api):
465465
def invoice(account, api):
466466
entity = api.invoices.create(dict(account_id=account['id']))
467467
yield entity
468-
entity.state_update(InvoiceState.cancelled)
468+
entity.state_update(InvoiceState.CANCELLED)
469469

470470

471471
@pytest.fixture(scope='module')

tests/integration/test_integration_invoices.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def invoice_to_update(account, api):
99
entity = api.invoices.create(dict(account_id=account['id']))
1010
yield entity
11-
entity.state_update(InvoiceState.cancelled)
11+
entity.state_update(InvoiceState.CANCELLED)
1212

1313

1414
def test_invoice_create(invoice):
@@ -49,15 +49,15 @@ def test_invoice_read_by_account(api, account, invoice):
4949

5050
def test_invoice_update_state(invoice_to_update, api):
5151
assert invoice_to_update['state'] == 'open'
52-
update = api.invoices.state_update(invoice_to_update.entity_id, InvoiceState.pending)
52+
update = api.invoices.state_update(invoice_to_update.entity_id, InvoiceState.PENDING)
5353
assert update['state'] == 'pending'
5454
read = api.invoices.read(invoice_to_update.entity_id)
5555
assert read['state'] == 'pending'
5656

5757

5858
def test_invoice_resource_update_state(invoice_to_update, api):
5959
assert invoice_to_update['state'] == 'open'
60-
update = invoice_to_update.state_update(InvoiceState.pending)
60+
update = invoice_to_update.state_update(InvoiceState.PENDING)
6161
assert update['state'] == 'pending'
6262
read = api.invoices.read(invoice_to_update.entity_id)
6363
assert read['state'] == 'pending'

0 commit comments

Comments
 (0)