def test_encode_decode(self): for ticket_value in TICKET_VALUES: encoded = ticket.encode(ticket_value) decoded = ticket.decode(encoded) self.assertEquals(ticket_value, decoded)
def test_decode_ticket(): assert { 'row': 11, 'class': 12, 'seat': 13 } == ticket.decode('16/test_input_2.txt')
def verify_ticket(self, ticket_id): vm = self.get_vending_machine() vm.verify(ticket.decode(ticket_id)) assert os.path.exists(self.get_ticket_filename(ticket_id))