def test_remove_availability(self): c = logged_in_client() available_event = EventObject.objects.filter( event_type="availability")[0] event_id = available_event.id response = c.post("/admin/remove/availability", {"id": event_id}) response_check = verify_json_response(response.content, settings.APP_CODE["DELETED"]) self.assertTrue(response_check)
def test_remove_availability(self): c = logged_in_client() available_event = EventObject.objects.filter( event_type="availability")[0] event_id = available_event.id response = c.post("/admin/remove/availability",{"id":event_id}) response_check = verify_json_response( response.content, settings.APP_CODE["DELETED"]) self.assertTrue(response_check)
def test_seller_rejection(self): """ Atleast one pending account needed for this test """ c = logged_in_client() seller_request = SellerRequest.objects.filter( status=settings.SELLER_REQUEST_STATUS["PENDING"])[0] approval = {"decision": settings.SELLER_REQUEST_STATUS["REJECTED"], "seller_request_id": seller_request.id} response = c.post("/admin/seller/request/decision", approval) response_check = verify_json_response(response.content, settings.APP_CODE["CALLBACK"]) self.assertTrue(response_check["code"]) self.assertEqual(response_check["data"]["request_status"], settings.SELLER_REQUEST_STATUS["REJECTED"])