def test_get_lot(self):
     setup_routing(self.app, routs=["tender_subpage_item"])
     lots = tender_partition(TEST_KEYS.tender_id, part="lots")
     for lot in lots:
         if lot['id'] == TEST_KEYS.lot_id:
             lot_ = munchify({"data": lot})
             break
     lot = self.client.get_lot(self.tender, lot_id=TEST_KEYS.lot_id)
     self.assertEqual(lot, lot_)
 def test_get_bid(self):
     setup_routing(self.app, routs=["tender_subpage_item"])
     bids = tender_partition(TEST_KEYS.tender_id, part="bids")
     for bid in bids:
         if bid['id'] == TEST_KEYS.bid_id:
             bid_ = munchify({"data": bid})
             break
     bid = self.client.get_bid(self.tender, bid_id=TEST_KEYS.bid_id, access_token=API_KEY)
     self.assertEqual(bid , bid_)
 def test_get_lot(self):
     setup_routing(self.app, routs=["tender_subpage_item"])
     lots = tender_partition(TEST_KEYS.tender_id, part="lots")
     for lot in lots:
         if lot['id'] == TEST_KEYS.lot_id:
             lot_ = munchify({"data": lot})
             break
     lot = self.client.get_lot(self.tender, lot_id=TEST_KEYS.lot_id)
     self.assertEqual(lot, lot_)
 def test_get_question(self):
     setup_routing(self.app, routs=["tender_subpage_item"])
     questions = tender_partition(TEST_KEYS.tender_id, part="questions")
     for question in questions:
         if question['id'] == TEST_KEYS.question_id:
             question_ = munchify({"data": question})
             break
     question = self.client.get_question(self.tender, question_id=TEST_KEYS.question_id)
     self.assertEqual(question, question_)
 def test_get_bid(self):
     setup_routing(self.app, routs=["tender_subpage_item"])
     bids = tender_partition(TEST_KEYS.tender_id, part="bids")
     for bid in bids:
         if bid['id'] == TEST_KEYS.bid_id:
             bid_ = munchify({"data": bid})
             break
     bid = self.client.get_bid(self.tender, bid_id=TEST_KEYS.bid_id, access_token=API_KEY)
     self.assertEqual(bid , bid_)
 def test_get_question(self):
     setup_routing(self.app, routs=["tender_subpage_item"])
     questions = tender_partition(TEST_KEYS.tender_id, part="questions")
     for question in questions:
         if question['id'] == TEST_KEYS.question_id:
             question_ = munchify({"data": question})
             break
     question = self.client.get_question(self.tender, question_id=TEST_KEYS.question_id)
     self.assertEqual(question, question_)
 def test_delete_lot(self):
     setup_routing(self.app, routs=["tender_subpage_item_delete"])
     lot_id = tender_partition(TEST_KEYS.tender_id, part="lots")[0]['id']
     deleted_lot = self.client.delete_lot(self.tender, lot_id)
     self.assertFalse(deleted_lot)
 def test_delete_bid(self):
     setup_routing(self.app, routs=["tender_subpage_item_delete"])
     bid_id = tender_partition(TEST_KEYS.tender_id, part="bids")[0]['id']
     deleted_bid = self.client.delete_bid(self.tender, bid_id, API_KEY)
     self.assertFalse(deleted_bid)
 def test_delete_lot(self):
     setup_routing(self.app, routs=["tender_subpage_item_delete"])
     lot_id = tender_partition(TEST_KEYS.tender_id, part="lots")[0]['id']
     deleted_lot = self.client.delete_lot(self.tender, lot_id)
     self.assertFalse(deleted_lot)
 def test_delete_bid(self):
     setup_routing(self.app, routs=["tender_subpage_item_delete"])
     bid_id = tender_partition(TEST_KEYS.tender_id, part="bids")[0]['id']
     deleted_bid = self.client.delete_bid(self.tender, bid_id, API_KEY)
     self.assertFalse(deleted_bid)