-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
76 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 12 additions & 5 deletions
17
services/web/server/src/simcore_service_webserver/studies_dispatcher/_constants.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,13 @@ | |
import urllib.parse | ||
from contextlib import contextmanager | ||
from datetime import datetime | ||
from typing import Dict | ||
from urllib.parse import unquote_plus | ||
|
||
import pytest | ||
import yarl | ||
from simcore_service_webserver.utils import ( | ||
DATETIME_FORMAT, | ||
compose_support_error_msg, | ||
compute_sha1_on_small_dataset, | ||
now_str, | ||
to_datetime, | ||
|
@@ -75,7 +75,7 @@ def test_yarl_url_compose_changed_with_latest_release(): | |
|
||
|
||
@pytest.mark.skip(reason="DEV-demo") | ||
async def test_compute_sha1_on_small_dataset(fake_project: Dict): | ||
async def test_compute_sha1_on_small_dataset(fake_project: dict): | ||
# Based on GitHK review https://github.com/ITISFoundation/osparc-simcore/pull/2556: | ||
# From what I know, these having function tend to be a bit CPU intensive, based on the size of the dataset. | ||
# Could we maybe have an async version of this function here, run it on an executor? | ||
|
@@ -126,3 +126,16 @@ def timeit_ctx(what): | |
|
||
# For larger datasets, async solution definitvely scales better | ||
# but for smaller ones, the overhead is considerable | ||
|
||
|
||
def test_compose_support_error_msg(): | ||
|
||
msg = compose_support_error_msg( | ||
"first sentence for Mr.X \n Second sentence.", | ||
error_code="OEC:139641204989600", | ||
support_email="[email protected]", | ||
) | ||
assert ( | ||
msg == "First sentence for Mr.X. Second sentence." | ||
" For more information please forward this message to [email protected] [OEC:139641204989600]" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters