Remove workspaces.name unique constraint

- Added some random indexes
- Fixed audit_events.request_id foreign key constraint
This commit is contained in:
richard-dds
2018-09-26 10:21:05 -04:00
parent 4de0338978
commit 885b2da308
4 changed files with 50 additions and 2 deletions

View File

@@ -250,3 +250,9 @@ def test_get_for_update_information():
ccpo = UserFactory.from_atat_role("ccpo")
with pytest.raises(UnauthorizedError):
Workspaces.get_for_update_information(ccpo, workspace.id)
def test_can_create_workspaces_with_matching_names():
workspace_name = "Great Workspace"
Workspaces.create(RequestFactory.create(), name=workspace_name)
Workspaces.create(RequestFactory.create(), name=workspace_name)