Update test for project deletion and path deletion mocks
@@ -181,11 +181,13 @@ class TestProjectDetailViewV1(BaseViewTest):
assert Experiment.objects.count() == 4
with patch('spawner.scheduler.stop_tensorboard') as tensorboard_mock_fct:
with patch('spawner.scheduler.stop_experiment') as xp_mock_stop:
- with patch('projects.utils.delete_path') as outputs_mock_stop:
+ with patch('projects.utils.delete_path') as delete_path_project_mock_stop:
+ with patch('experiments.utils.delete_path') as delete_path_xp_mock_stop:
resp = self.auth_client.delete(self.url)
assert xp_mock_stop.call_count == 4
assert tensorboard_mock_fct.call_count == 1
- assert outputs_mock_stop.call_count == 1
+ assert delete_path_project_mock_stop.call_count == 6 # 2 * project + 2 * 2 * groups
+ assert delete_path_xp_mock_stop.call_count == 8 # 2 * 4 * groups
assert resp.status_code == status.HTTP_204_NO_CONTENT
assert self.queryset.count() == 0
assert ExperimentGroup.objects.count() == 0
