def __init__(self, seat=None): """Initializing Seat class: this is a single chair, created as a linked list""" ID.__init__(self) self.__name = seat self.l_seat = None self.r_seat = None self.__status = "available"
def __init__(self, wid=0, amount=1, patron=Patron()): ID.__init__(self) self.__patron = patron self.__wid = wid self.__amount = amount self.__tickets = list() self.__status = "pending"
def __init__(self, price=0, wid=0, sid=0, cid=None, seat=None): ID.__init__(self) self.__wid = wid self.__sid = sid self.__cid = cid self.__seat = seat self.__price = price self.__status = "open"
def __init__(self, sid=None, price=None, rows=list(), name=None): """Initialization of Section Class""" ID.__init__(self, sid) self.__name = name self.__price = price self.__rows = list() self.__bought_seats = 0 self.__seats_total = 0 self.create_section(rows)
def __init__(self, name="", email="", phone="", bill_add="", cc_num="", cc_exp=""): ID.__init__(self) self.__name = name self.__phone = phone self.__email = email self.__bill_adr = bill_add self.__cc_num = cc_num self.__cc_exp = cc_exp
def __init__(self, new_id=str(800), start=None, end=None, name='Reporter', shows=list()): ID.__init__( self, new_id=new_id, ) self.__name = name self.__start_date = datetime.strptime(start, '%Y%m%D') if start else None self.__end_date = datetime.strptime(end, '%Y%m%D') if end else None self.__shows = shows self.__total_seats = 0 self.__total_sold = 0
def __init__(self, show_info=None, seating_info=None): ID.__init__(self) self.__show_info = show_info self.__seating_info = seating_info self.__total_seats = 0 self.__total_sold = 0
def __init__(self, wid=0, tickets=list(), patron=None): ID.__init__(self) self.__wid = wid self.__tickets = tickets self.__patron = patron self.__date_ordered = datetime.datetime.today()
from thalia.id import ID new_id = ID() def test_get_id(): assert new_id.get_id() is not None def test_check_id(): o_id = new_id.get_id() assert new_id.check_id(o_id) is True assert new_id.check_id(1) is False def test_set_id(): new_id.set_id(2) assert new_id.get_id() == 2 def test_search(): assert new_id.search('id', 'id') is new_id o_id = new_id.get_id() assert new_id.search('id', o_id) is new_id if __name__ == '__main__': test_check_id() test_get_id() test_set_id() test_search()
def __init__(self, row=None, seats=list()): ID.__init__(self, row) self.__seats = None # list of seats self.create_row(seats) # creation of row