Skip to content

Commit

Permalink
nit #11570
Browse files Browse the repository at this point in the history
  • Loading branch information
chrabyrd committed Nov 14, 2024
1 parent af89334 commit 723485d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests/models/graph_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2186,21 +2186,25 @@ def test_placing_node_in_separate_card_does_not_pollute_database(self):
)
editable_future_graph = updated_source_graph.create_editable_future_graph()

node = [node for node in editable_future_graph.nodes.values()][2]

# fixes flaky test
models.NodeGroup.objects.filter(pk=node.pk).delete()

nodegroup_count_before = models.NodeGroup.objects.count()

node = [node for node in editable_future_graph.nodes.values()][2]
source_identifier_id = node.source_identifier_id
original_nodegroup_id = node.nodegroup_id
updated_nodegroup_id = node.pk

models.NodeGroup.objects.update_or_create(
nodegroupid=str(updated_nodegroup_id),
defaults={
models.NodeGroup.objects.create(
**{
"cardinality": "n",
"legacygroupid": "",
"nodegroupid": str(updated_nodegroup_id),
"parentnodegroup_id": None,
},
)
}
).save()

node.nodegroup_id = updated_nodegroup_id
node.save()
Expand Down

0 comments on commit 723485d

Please sign in to comment.