Update tests - remove references to Workspace, use url_for, and check to make sure time_updated does not change on the application

This commit is contained in:
leigh-mil
2019-03-26 10:33:20 -04:00
parent 5d2b8556ed
commit b5571000fe
2 changed files with 11 additions and 6 deletions

View File

@@ -173,12 +173,12 @@ def test_user_can_only_revoke_invites_in_their_portfolio(client, user_session):
portfolio = PortfolioFactory.create()
other_portfolio = PortfolioFactory.create()
user = UserFactory.create()
ws_role = PortfolioRoleFactory.create(
portfolio_role = PortfolioRoleFactory.create(
user=user, portfolio=other_portfolio, status=PortfolioRoleStatus.PENDING
)
invite = InvitationFactory.create(
user_id=user.id,
portfolio_role=ws_role,
portfolio_role=portfolio_role,
status=InvitationStatus.REJECTED_EXPIRED,
expiration_time=datetime.datetime.now() - datetime.timedelta(seconds=1),
)
@@ -199,12 +199,12 @@ def test_user_can_only_resend_invites_in_their_portfolio(client, user_session, q
portfolio = PortfolioFactory.create()
other_portfolio = PortfolioFactory.create()
user = UserFactory.create()
ws_role = PortfolioRoleFactory.create(
portfolio_role = PortfolioRoleFactory.create(
user=user, portfolio=other_portfolio, status=PortfolioRoleStatus.PENDING
)
invite = InvitationFactory.create(
user_id=user.id,
portfolio_role=ws_role,
portfolio_role=portfolio_role,
status=InvitationStatus.REJECTED_EXPIRED,
expiration_time=datetime.datetime.now() - datetime.timedelta(seconds=1),
)