예제 #1
0
 def testCreate(self):
     deal = Deal(DealTest.conn)
     deal.set_buyer(4091)
     deal['name'] = 'python test deal'
     deal['floor_price'] = 1.0
     result = deal.create()
     assert result == deal.get('id')
예제 #2
0
 def testCreate(self):
     deal = Deal(DealTest.conn)
     deal.set_buyer(4091)
     deal['name'] = 'python test deal'
     deal['floor_price'] = 1.0
     result = deal.create()
     assert result == deal.get('id')
예제 #3
0
 def testGet(self):
     loader = Deal(DealTest.conn)
     deals = json.loads(loader.find())
     for deal in deals.get('data').get('response').get('deals'):
         assert deal.get('id') is not None
예제 #4
0
 def testGetById(self):
     deal_id = 6007
     loader = Deal(DealTest.conn)
     deal = json.loads(loader.find(deal_id))
     assert deal_id == deal.get('data').get('response').get('deal').get(
         'id')
예제 #5
0
 def testGetById(self):
     deal_id = 2000
     loader = Deal(DealTest.conn)
     deal = loader.find(deal_id)
     assert deal_id == deal.get('id')
예제 #6
0
 def testGet(self):
     loader = Deal(DealTest.conn)
     deals = loader.find()
     for deal in deals:
         assert deal.get('id') is not None
예제 #7
0
 def testGetById(self):
     deal_id = 2000
     loader = Deal(DealTest.conn)
     deal = loader.find(deal_id)
     assert deal_id == deal.get('id')
예제 #8
0
 def testGet(self):
     loader = Deal(DealTest.conn)
     deals = loader.find()
     for deal in deals:
         assert deal.get('id') is not None