File: test_local.py

package info (click to toggle)
gmailieer 1.6-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 712 kB
  • sloc: python: 2,130; makefile: 14
file content (15 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import pytest

import lieer


def test_update_translation_list(gmi):
    l = lieer.Local(gmi)
    l.update_translation_list_with_overlay(["a", "1", "b", "2"])
    assert l.translate_labels["a"] == "1"
    assert l.translate_labels["b"] == "2"
    assert l.labels_translate["1"] == "a"
    assert l.labels_translate["2"] == "b"

    with pytest.raises(Exception):
        l.update_translation_list_with_overlay(["a", "1", "b", "2", "c"])