예제 #1
0
 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"
예제 #2
0
 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"
예제 #3
0
 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"
예제 #4
0
 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)
예제 #5
0
 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
예제 #6
0
 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
예제 #7
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
예제 #8
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()
예제 #9
0
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()
예제 #10
0
 def __init__(self, row=None, seats=list()):
     ID.__init__(self, row)
     self.__seats = None  # list of seats
     self.create_row(seats)  # creation of row