Esempio n. 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"]
    }
Esempio n. 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'}) == {}
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
    ) == {}
Esempio n. 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
    ) == {}
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"},
    ) == {})
Esempio n. 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'}
    ) == {}
Esempio n. 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']
    }
Esempio n. 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']
    }