Ejemplo n.º 1
0
 def setUp(self):
     # create the users
     self.buyer = User.create_user(self.BUYER_USERNAME, \
             self.BUYER_FIRST_NAME, self.BUYER_LAST_NAME, \
             self.BUYER_EMAIL, self.BUYER_CELL_PHONE,
             self.BUYER_LOCATION)
     self.seller = User.create_user(self.SELLER_USERNAME, \
             self.SELLER_FIRST_NAME, self.SELLER_LAST_NAME, \
             self.SELLER_EMAIL, self.SELLER_CELL_PHONE,
             self.SELLER_LOCATION)
     # create the categories
     self.category1 = Category.create_category(self.CATEGORY_1)
     self.category2 = Category.create_category(self.CATEGORY_2)
     # create the items
     self.item1 = Item.create_item(self.seller, self.ITEM_1_NAME, \
             self.ITEM_1_DESCRIPTION, self.category1, self.ITEM_1_PRICE)
     self.item2 = Item.create_item(self.seller, self.ITEM_2_NAME, \
             self.ITEM_2_DESCRIPTION, self.category2, self.ITEM_2_PRICE)
Ejemplo n.º 2
0
 def setUp(self):
     self.category = Category.create_category(self.GIRS_CATEGORY)
     self.user = User.create_user(self.USERNAME, self.FIRST_NAME, self.LAST_NAME, \
             self.EMAIL, self.PHONE, self.LOCATION)
     self.item1 = Item.create_item(self.user, self.PHYSICS_NAME, \
             self.PHYSICS_DESCRIPTION, self.category, self.PHYSICS_PRICE_1)
     self.item2 = Item.create_item(self.user, self.PHYSICS_NAME, \
             self.PHYSICS_DESCRIPTION, self.category, self.PHYSICS_PRICE_2)
     self.item3 = Item.create_item(self.user, self.VIDEO_NAME, \
             self.VIDEO_DESCRIPTION, self.category, self.VIDEO_PRICE)
     self.reservation1 = Reservation.create_reservation(self.user, \
             self.SEARCH_QUERY1, self.MAX_PRICE)
     self.reservation2 = self.user.add_reservation(self.SEARCH_QUERY2, self.MAX_PRICE)
Ejemplo n.º 3
0
    def setUp(self):
        # create the user
        self.user = User.create_user(self.USERNAME, self.FIRST_NAME, \
                self.LAST_NAME, self.EMAIL, self.PHONE, self.LOCATION)

        # create the categories
        self.textbooks = Category.create_category(self.TEXTBOOK_CATEGORY)
        self.videos = Category.create_category(self.VIDEOS_CATEGORY)
        self.girs = Category.create_category(self.GIRS_CATEGORY)

        # create the items
        self.textbook_3091_1 = Item.create_item(self.user, self.TEXTBOOK_NAME, \
                self.TEXTBOOK_DESCRIPTION, self.textbooks, self.TEXTBOOK_PRICE)
        self.textbook_3091_2 = self.user.add_item(self.TEXTBOOK_NAME, \
                self.TEXTBOOK_DESCRIPTION, self.textbooks, self.TEXTBOOK_PRICE)
        self.video_5111 = self.user.add_item(self.VIDEOS_NAME, \
                self.VIDEOS_DESCRIPTION, self.videos, self.VIDEOS_PRICE)
        self.cheat_sheets = self.user.add_item(self.CHEAT_SHEET_NAME, \
                self.CHEAT_SHEET_DESCRIPTION, self.girs, self.CHEAT_SHEET_PRICE)
Ejemplo n.º 4
0
 def setUp(self):
     # create a user
     self.user = User.create_user(self.USERNAME, self.FIRST_NAME, \
             self.LAST_NAME, self.EMAIL, self.PHONE, self.LOCATION)
Ejemplo n.º 5
0
macgregor = Location.create_location('MacGregeor House', '42.35543', '-71.09981')
maseeh = Location.create_location('Maseeh Hall', '42.35764801061463', '-71.09338732275393')
mccormick = Location.create_location('McCormick Hall', '42.35731', '-71.09454')
new_house = Location.create_location('New House', '42.35543', '-71.10023')
next_house = Location.create_location('Next House', '42.354714540813504', '-71.10203476461794')
random_hall = Location.create_location('Random Hall', '42.36191', '-71.09821')
senior = Location.create_location('Senior House', '42.36007', '-71.08689')
simmons = Location.create_location('Simmons Hall', '42.35733', '-71.10105')

# Add in categories
girs = Category.create_category('GIRs')
furniture = Category.create_category('Furniture')
clothing = Category.create_category('Clothing')
santorum = Category.create_category('Rainbow-colored Santorum Posters')

kerry = User.create_user('kxing', 'Kerry', 'Xing', '*****@*****.**', '(123)456-7890', next_house)
paul = User.create_user('pwh', 'Paul', 'Hemberger', '*****@*****.**', '(234)567-8901', maseeh)
sean = User.create_user('scockey', 'Sean', 'Cockey', '*****@*****.**', '(345)678-9012', maseeh)
sarine = User.create_user('sarine', 'Sarine', 'Shahmirian', '*****@*****.**', '(456)789-0123', bexely)

kerry.add_item('5.111 Textbook', 'In great condition.', girs, '30.99')
time.sleep(1.0)
kerry.add_item('Wooden Chair', 'Slightly worn.', furniture, '24.97')
time.sleep(1.0)
kerry.add_item('Santorum Poster', 'Really want to get rid of this...', santorum, '0.01')
time.sleep(1.0)
kerry.add_item('Blue Jeans', 'size 30-30. New.', clothing, '30.00')
time.sleep(1.0)
kerry.add_item('3.091 Textbook', 'Simply awesome.', girs, '1000.00')
time.sleep(1.0)
kerry.add_item('Couch', 'Very comfortable.', furniture, '99.99')