Skip to content

Commit

Permalink
Fix collab analysis create/import tests for mysql
Browse files Browse the repository at this point in the history
Need to pass the workspace pk instead of the workspace_data pk.
  • Loading branch information
amstilp committed Jan 25, 2024
1 parent 8920bc1 commit 5f021a2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions primed/collaborative_analysis/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def setUp(self):
)
self.workspace_type = "collab_analysis"
self.custodian = UserFactory.create()
self.source_workspace = dbGaPWorkspaceFactory.create()
self.source_workspace = dbGaPWorkspaceFactory.create().workspace
self.analyst_group = ManagedGroupFactory.create()

def get_url(self, *args):
Expand Down Expand Up @@ -200,9 +200,6 @@ def test_creates_workspace(self):
"workspacedata-0-analyst_group": self.analyst_group.pk,
},
)
print(response.content)
print(response.context_data["form"].errors)
print(response.context_data["workspace_data_formset"].errors)
self.assertEqual(response.status_code, 302)
# The workspace is created.
new_workspace = Workspace.objects.latest("pk")
Expand Down Expand Up @@ -234,7 +231,7 @@ def setUp(self):
)
)
self.custodian = UserFactory.create()
self.source_workspace = dbGaPWorkspaceFactory.create()
self.source_workspace = dbGaPWorkspaceFactory.create().workspace
self.workspace_type = "collab_analysis"
self.analyst_group = ManagedGroupFactory.create()

Expand Down

0 comments on commit 5f021a2

Please sign in to comment.