Пример #1
0
def test_tt_invalid_translation(mock_locale):
    """
    Check if translate toolkit returns errors if chek
    """
    assert run_checks("Original string", "Translation \\q", mock_locale,) == {
        "ttWarnings": ["Escapes"]
    }
Пример #2
0
def test_tt_disabled_checks(mock_locale):
    """
    Disabled checks should be respected by the run_checks.
    """
    assert run_checks('Original string',
                      'Translation \\q',
                      mock_locale,
                      disabled_checks={'escapes'}) == {}
Пример #3
0
def test_tt_correct_translation(mock_locale):
    """
    Quality check should return empty dictionary if everything is okay (no warnings).
    """
    assert run_checks(
        'Original string',
        'Translation string',
        mock_locale
    ) == {}
Пример #4
0
def test_tt_correct_translation(mock_locale):
    """
    Quality check should return empty dictionary if everything is okay (no warnings).
    """
    assert run_checks(
        'Original string',
        'Translation string',
        mock_locale
    ) == {}
Пример #5
0
def test_tt_disabled_checks(mock_locale):
    """
    Disabled checks should be respected by the run_checks.
    """
    assert (run_checks(
        "Original string",
        "Translation \\q",
        mock_locale,
        disabled_checks={"escapes"},
    ) == {})
Пример #6
0
def test_tt_disabled_checks(mock_locale):
    """
    Disabled checks should be respected by the run_checks.
    """
    assert run_checks(
        'Original string',
        'Translation \q',
        mock_locale,
        disabled_checks={'escapes'}
    ) == {}
Пример #7
0
def test_tt_invalid_translation(mock_locale):
    """
    Check if translate toolkit returns errors if chek
    """
    assert run_checks(
        'Original string',
        'Translation \\q',
        mock_locale,
    ) == {
        'ttWarnings': ['Escapes']
    }
Пример #8
0
def test_tt_invalid_translation(mock_locale):
    """
    Check if translate toolkit returns errors if chek
    """
    assert run_checks(
        'Original string',
        'Translation \q',
        mock_locale,
    ) == {
        'ttWarnings': ['Escapes']
    }