3 from translate
.storage
import csvl10n
4 from translate
.storage
import test_base
6 class TestCSVUnit(test_base
.TestTranslationUnit
):
7 UnitClass
= csvl10n
.csvunit
9 class TestCSV(test_base
.TestTranslationStore
):
10 StoreClass
= csvl10n
.csvfile
12 def test_singlequoting(self
):
13 """Tests round trip on single quoting at start of string"""
14 store
= self
.StoreClass()
15 unit1
= store
.addsourceunit("Test 'String'")
16 unit2
= store
.addsourceunit("'Blessed' String")
17 unit3
= store
.addsourceunit("'Quoted String'")
18 assert unit3
.source
== "'Quoted String'"
19 newstore
= self
.reparse(store
)
20 self
.check_equality(store
, newstore
)
21 assert store
.units
[2] == newstore
.units
[2]
22 assert str(store
) == str(newstore
)