Add migration for enforcing uniqueness of an application name within a portfolio and update create/update Applicaiton domain methods.

This commit is contained in:
leigh-mil
2019-12-13 14:49:39 -05:00
parent 483b00a947
commit 22dd5d7b85
7 changed files with 87 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
import pytest
import random
from uuid import uuid4
from atst.domain.exceptions import NotFoundError, UnauthorizedError
@@ -97,7 +98,7 @@ def test_scoped_portfolio_returns_all_applications_for_portfolio_admin(
Applications.create(
portfolio.owner,
portfolio,
"My Application",
"My Application %s" % (random.randrange(1, 1000)),
"My application",
["dev", "staging", "prod"],
)
@@ -120,7 +121,7 @@ def test_scoped_portfolio_returns_all_applications_for_portfolio_owner(
Applications.create(
portfolio.owner,
portfolio,
"My Application",
"My Application %s" % (random.randrange(1, 1000)),
"My application",
["dev", "staging", "prod"],
)