diff --git a/livestyled/schemas/tests/fixtures/example_ticket.json b/livestyled/schemas/tests/fixtures/example_ticket.json index 09ccf32..1ca7992 100644 --- a/livestyled/schemas/tests/fixtures/example_ticket.json +++ b/livestyled/schemas/tests/fixtures/example_ticket.json @@ -47,5 +47,6 @@ "sort": 0 } ], - "ticketType": "ticket" + "ticketType": "ticket", + "aisle": "aisle" } diff --git a/livestyled/schemas/tests/fixtures/example_ticket_shared.json b/livestyled/schemas/tests/fixtures/example_ticket_shared.json index bcfba43..e705da6 100644 --- a/livestyled/schemas/tests/fixtures/example_ticket_shared.json +++ b/livestyled/schemas/tests/fixtures/example_ticket_shared.json @@ -21,5 +21,6 @@ "shareCode": "ABCDEF12345", "sharedAt": "2019-05-24T12:41:22+00:00", "sharerEmail": "test@livestyled.com", - "ticketType": "ticket" + "ticketType": "ticket", + "aisle": "aisle" } \ No newline at end of file diff --git a/livestyled/schemas/tests/fixtures/example_ticket_shared_redeemed.json b/livestyled/schemas/tests/fixtures/example_ticket_shared_redeemed.json index 46132dc..7df69e6 100644 --- a/livestyled/schemas/tests/fixtures/example_ticket_shared_redeemed.json +++ b/livestyled/schemas/tests/fixtures/example_ticket_shared_redeemed.json @@ -24,5 +24,6 @@ "redeemerEmail": "someoneelse@livestyled.com", "redeemedAt": "2019-05-24T13:41:22+00:00", "redeemer": "/v4/users/1234", - "ticketType": "ticket" + "ticketType": "ticket", + "aisle": "aisle" } \ No newline at end of file diff --git a/livestyled/schemas/tests/fixtures/example_ticket_with_event_and_venue.json b/livestyled/schemas/tests/fixtures/example_ticket_with_event_and_venue.json index f9e1f7d..15f6207 100644 --- a/livestyled/schemas/tests/fixtures/example_ticket_with_event_and_venue.json +++ b/livestyled/schemas/tests/fixtures/example_ticket_with_event_and_venue.json @@ -53,5 +53,6 @@ "clientEmail": "hakan.goransson@stockholmlive.com", "clientId": "hakan.goransson@stockholmlive.com" }, - "ticketType": "ticket" + "ticketType": "ticket", + "aisle": "aisle" } \ No newline at end of file diff --git a/livestyled/schemas/tests/test_ticket.py b/livestyled/schemas/tests/test_ticket.py index 09eee6e..20b2597 100644 --- a/livestyled/schemas/tests/test_ticket.py +++ b/livestyled/schemas/tests/test_ticket.py @@ -92,6 +92,7 @@ def test_deserialize_ticket(): 'printed': True, 'timezone': None, 'ticket_type': 'ticket', + 'aisle': 'aisle', } @@ -152,6 +153,7 @@ def test_deserialize_ticket_shared(): 'printed': True, 'timezone': None, 'ticket_type': 'ticket', + 'aisle': 'aisle', } @@ -212,6 +214,7 @@ def test_deserialize_ticket_shared_redeemed(): 'printed': True, 'timezone': None, 'ticket_type': 'ticket', + 'aisle': 'aisle', } @@ -286,6 +289,7 @@ def test_deserialize_ticket_with_event_and_venue(): 'printed': True, 'timezone': None, 'ticket_type': 'ticket', + 'aisle': 'aisle', } @@ -300,6 +304,7 @@ def test_serialize_ticket(): event=9999, user=8888, ticket_type='ticket', + aisle='aisle', ) serialized_ticket = TicketSchema().dump(ticket) assert serialized_ticket == { @@ -354,6 +359,7 @@ def test_serialize_ticket(): 'printed': True, 'timezone': None, 'ticketType': 'ticket', + 'aisle': 'aisle', } @@ -427,6 +433,7 @@ def get_ticket(data: Dict or None = None): ], 'timezone': None, 'ticket_type': 'ticket', + 'aisle': 'aisle', } if data: diff --git a/livestyled/tests/test_resource_client_ticket.py b/livestyled/tests/test_resource_client_ticket.py index 49b5f30..609cb4a 100644 --- a/livestyled/tests/test_resource_client_ticket.py +++ b/livestyled/tests/test_resource_client_ticket.py @@ -57,7 +57,8 @@ def test_get_ticket(requests_mock): assert ticket.venue_name is None assert ticket.venue_room is None assert ticket.redeemed_at is None - assert ticket.ticket_type is 'ticket' + assert ticket.ticket_type == 'ticket' + assert ticket.aisle is None def test_get_ticket_shared(requests_mock): @@ -104,7 +105,8 @@ def test_get_ticket_shared(requests_mock): assert ticket.venue_name is None assert ticket.venue_room is None assert ticket.redeemed_at is None - assert ticket.ticket_type is 'ticket' + assert ticket.ticket_type == 'ticket' + assert ticket.aisle is None def test_get_ticket_shared_redeemed(requests_mock): @@ -152,7 +154,8 @@ def test_get_ticket_shared_redeemed(requests_mock): assert ticket.venue_name is None assert ticket.venue_room is None assert ticket.redeemed_at == datetime(2019, 5, 24, 13, 41, 22, tzinfo=timezone(timedelta(0), '+0000')) - assert ticket.ticket_type is 'ticket' + assert ticket.ticket_type == 'ticket' + assert ticket.aisle is None def test_create_ticket(requests_mock):