Verified Commit 47aa4200 authored by Peter Stanko's avatar Peter Stanko
Browse files

Test for update-test-files

parent ba442e7a
Pipeline #16351 passed with stage
in 10 minutes and 14 seconds
......@@ -179,8 +179,7 @@ class ProjectService(GeneralService):
return filters.filter_projects_from_course(course=course, user=perm_service.client)
raise ForbiddenError(perm_service.client)
def update_project_test_files(self):
def update_project_test_files(self):
""" Sends a request to Storage to update the project's test_files to the newest version.
......@@ -3,7 +3,6 @@ from datetime import timedelta
import pytest
from flask_jwt_extended import create_access_token
from mock import patch
from portal.database.models import Course, Project, User
from import current_time, strip_seconds
......@@ -282,3 +281,12 @@ def test_create_submission_as_with_default_params(client, ent_mocker, rest_servi
assert submission.parameters['file_params']['from_dir'] == project.codename
gitlab_url = f'git@gitlab.local/{user.username}/{course.codename}'
assert submission.parameters['file_params']['source']['url'] == gitlab_url
def test_refresh_test_files(client, ent_mocker, rest_service):
project = rest_service.find.project('testcourse1', 'hw01')
path = f'/courses/{}/projects/{}/test-files-refresh'
response = rest_tools.make_request(client, path, method='post')
assert_response(response, code=204)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment