Exemplo n.º 1
0
 def test_get_location_error(self):
     setup_routing(self.app, routs=["tender_subpage_item"])
     self.assertEqual(self.client.get_question(self.empty_tender, question_id=TEST_KEYS.question_id),
                      munchify(loads(location_error('questions'))))
     self.assertEqual(self.client.get_lot(self.empty_tender, lot_id=TEST_KEYS.lot_id),
                      munchify(loads(location_error('lots'))))
     self.assertEqual(self.client.get_bid(self.empty_tender, bid_id=TEST_KEYS.bid_id, access_token=API_KEY),
                      munchify(loads(location_error('bids'))))
 def test_get_location_error(self):
     setup_routing(self.app, routs=["tender_subpage_item"])
     self.assertEqual(self.client.get_question(self.empty_tender, question_id=TEST_KEYS.question_id),
                      munchify(loads(location_error('questions'))))
     self.assertEqual(self.client.get_lot(self.empty_tender, lot_id=TEST_KEYS.lot_id),
                      munchify(loads(location_error('lots'))))
     self.assertEqual(self.client.get_bid(self.empty_tender, bid_id=TEST_KEYS.bid_id, access_token=API_KEY),
                      munchify(loads(location_error('bids'))))
Exemplo n.º 3
0
 def test_delete_location_error(self):
     setup_routing(self.app, routs=["tender_subpage_item_delete"])
     self.assertEqual(
         self.client.delete_bid(self.empty_tender, TEST_KEYS.error_id,
                                API_KEY),
         munchify(loads(location_error('bids'))))
     self.assertEqual(
         self.client.delete_lot(self.empty_tender, TEST_KEYS.error_id),
         munchify(loads(location_error('lots'))))
Exemplo n.º 4
0
 def test_patch_location_error(self):
     setup_routing(self.app, routs=["tender_subpage_item_patch"])
     error = munchify({"data": {"id": TEST_KEYS.error_id}, "access": {"token": API_KEY}})
     self.assertEqual(self.client.patch_question(self.empty_tender, error),
                      munchify(loads(location_error('questions'))))
     self.assertEqual(self.client.patch_bid(self.empty_tender, error),
                      munchify(loads(location_error('bids'))))
     self.assertEqual(self.client.patch_award(self.empty_tender, error),
                      munchify(loads(location_error('awards'))))
     self.assertEqual(self.client.patch_lot(self.empty_tender, error),
                      munchify(loads(location_error('lots'))))
     self.assertEqual(self.client.patch_document(self.empty_tender, error),
                      munchify(loads(location_error('documents'))))
 def test_delete_location_error(self):
     setup_routing(self.app, routs=["tender_subpage_item_delete"])
     self.assertEqual(
         self.client.delete_bid(self.empty_tender, TEST_KEYS.error_id, API_KEY),
         munchify(loads(location_error("bids"))),
     )
     self.assertEqual(
         self.client.delete_lot(self.empty_tender, TEST_KEYS.error_id), munchify(loads(location_error("lots")))
     )
Exemplo n.º 6
0
 def test_patch_location_error(self):
     setup_routing(self.app, routs=["tender_subpage_item_patch"])
     error = munchify({
         "data": {
             "id": TEST_KEYS.error_id
         },
         "access": {
             "token": API_KEY
         }
     })
     self.assertEqual(self.client.patch_question(self.empty_tender, error),
                      munchify(loads(location_error('questions'))))
     self.assertEqual(self.client.patch_bid(self.empty_tender, error),
                      munchify(loads(location_error('bids'))))
     self.assertEqual(self.client.patch_award(self.empty_tender, error),
                      munchify(loads(location_error('awards'))))
     self.assertEqual(self.client.patch_lot(self.empty_tender, error),
                      munchify(loads(location_error('lots'))))
     self.assertEqual(self.client.patch_document(self.empty_tender, error),
                      munchify(loads(location_error('documents'))))
Exemplo n.º 7
0
 def test_get_tender_location_error(self):
     setup_routing(self.app, routs=["tender"])
     tender = self.client.get_tender(TEST_KEYS.error_id)
     self.assertEqual(tender, munchify(loads(location_error('tender'))))
 def test_get_tender_location_error(self):
     setup_routing(self.app, routs=["tender"])
     tender = self.client.get_tender(TEST_KEYS.error_id)
     self.assertEqual(tender, munchify(loads(location_error('tender'))))
 def test_get_plan_location_error(self):
     setup_routing(self.app, routs=["plan"])
     tender = self.client.get_plan(TEST_PLAN_KEYS.error_id)
     self.assertEqual(tender, munchify(loads(location_error('plan'))))
Exemplo n.º 10
0
 def test_get_plan_location_error(self):
     setup_routing(self.app, routs=["plan"])
     tender = self.client.get_plan(TEST_PLAN_KEYS.error_id)
     self.assertEqual(tender, munchify(loads(location_error('plan'))))
Exemplo n.º 11
0
 def test_get_contract_location_error(self):
     setup_routing(self.app, routes=["contract"])
     contract = self.client.get_contract(TEST_CONTRACT_KEYS.error_id)
     self.assertEqual(contract, munchify(loads(location_error('contract'))))