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