Use Environment.portofolio and portfolio_id properties instead of accessing them through application

This commit is contained in:
leigh-mil
2020-02-25 15:01:05 -05:00
parent 3544896d32
commit 2a2fafe7ea
9 changed files with 14 additions and 17 deletions

View File

@@ -786,10 +786,9 @@ def test_create_subscription_success(
client, user_session, mock_azure: AzureCloudProvider
):
environment = EnvironmentFactory.create()
user_session(environment.portfolio.owner)
environment.cloud_id = "management/group/id"
environment.application.portfolio.csp_data = {
environment.portfolio.csp_data = {
"billing_account_name": "xxxx-xxxx-xxx-xxx",
"billing_profile_name": "xxxxxxxxxxx:xxxxxxxxxxxxx_xxxxxx",
"tenant_id": "xxxxxxxxxxx-xxxxxxxxxx-xxxxxxx-xxxxx",
@@ -832,7 +831,7 @@ def test_create_subscription_failure(client, user_session, monkeypatch):
user_session(environment.portfolio.owner)
environment.cloud_id = "management/group/id"
environment.application.portfolio.csp_data = {
environment.portfolio.csp_data = {
"billing_account_name": "xxxx-xxxx-xxx-xxx",
"billing_profile_name": "xxxxxxxxxxx:xxxxxxxxxxxxx_xxxxxx",
"tenant_id": "xxxxxxxxxxx-xxxxxxxxxx-xxxxxxx-xxxxx",