Update TO form based on new model
This commit is contained in:
@@ -13,21 +13,20 @@ from atst.models import CSPRole, PortfolioRoleStatus, ApplicationRoleStatus
|
||||
from tests.factories import *
|
||||
|
||||
_NO_ACCESS_CHECK_REQUIRED = _NO_LOGIN_REQUIRED + [
|
||||
"task_orders.get_started", # all users can start a new TO
|
||||
"atst.csp_environment_access", # internal redirect
|
||||
"atst.jedi_csp_calculator", # internal redirect
|
||||
"atst.styleguide", # dev reference
|
||||
"dev.test_email", # dev tool
|
||||
"dev.messages", # dev tool
|
||||
"atst.home", # available to all users
|
||||
"users.user", # available to all users
|
||||
"users.update_user", # available to all users
|
||||
"portfolios.accept_invitation", # available to all users; access control is built into invitation logic
|
||||
"applications.accept_invitation", # available to all users; access control is built into invitation logic
|
||||
"atst.catch_all", # available to all users
|
||||
"portfolios.portfolios", # the portfolios list is scoped to the user separately
|
||||
"atst.csp_environment_access", # internal redirect
|
||||
"atst.home", # available to all users
|
||||
"atst.jedi_csp_calculator", # internal redirect
|
||||
"atst.styleguide", # dev reference
|
||||
"dev.messages", # dev tool
|
||||
"dev.test_email", # dev tool
|
||||
"portfolios.accept_invitation", # available to all users; access control is built into invitation logic
|
||||
"portfolios.create_portfolio", # create a portfolio"portfolios.portfolios", # the portfolios list is scoped to the user separately
|
||||
"portfolios.new_portfolio", # all users can create a portfolio
|
||||
"portfolios.create_portfolio", # create a portfolio
|
||||
"task_orders.get_started", # all users can start a new TO
|
||||
"users.update_user", # available to all users
|
||||
"users.user", # available to all users
|
||||
]
|
||||
|
||||
|
||||
@@ -479,25 +478,14 @@ def test_task_orders_download_task_order_pdf_access(get_url_assert_status, monke
|
||||
|
||||
|
||||
# task_orders.new
|
||||
@pytest.mark.skip(reason="Update after new TO form implemented")
|
||||
def test_task_orders_new_access(get_url_assert_status):
|
||||
ccpo = user_with(PermissionSets.EDIT_PORTFOLIO_FUNDING)
|
||||
owner = user_with()
|
||||
rando = user_with()
|
||||
|
||||
url = url_for("task_orders.new", screen=1)
|
||||
get_url_assert_status(owner, url, 200)
|
||||
get_url_assert_status(ccpo, url, 200)
|
||||
get_url_assert_status(rando, url, 200)
|
||||
|
||||
portfolio = PortfolioFactory.create(owner=owner)
|
||||
task_order = TaskOrderFactory.create(portfolio=portfolio)
|
||||
|
||||
url = url_for("task_orders.new", screen=2, task_order_id=task_order.id)
|
||||
get_url_assert_status(owner, url, 200)
|
||||
get_url_assert_status(ccpo, url, 200)
|
||||
get_url_assert_status(rando, url, 404)
|
||||
|
||||
url = url_for("task_orders.new", screen=1, portfolio_id=portfolio.id)
|
||||
url = url_for("task_orders.new", portfolio_id=portfolio.id)
|
||||
get_url_assert_status(owner, url, 200)
|
||||
get_url_assert_status(ccpo, url, 200)
|
||||
get_url_assert_status(rando, url, 404)
|
||||
|
Reference in New Issue
Block a user