Exemplo n.º 1
0
 def test__to_str__given_encoded_diacritics__should_return_unicode_string(
         self):
     u"""Tests for conversion of unicode literals to unicode."""
     assert helpers.to_str(u'ążśęćółń') == u'ążśęćółń'
     assert helpers.to_str(u'\u0105') == u'ą'
     assert helpers.to_str(u'\u0105\u017c\u017a\u0107') == u'ążźć'
     assert helpers.to_str({'a': 3}) == "{'a': 3}"
Exemplo n.º 2
0
 def test__to_str__given_encoded_diacritics__should_return_unicode_string(self):
     u"""Tests for conversion of unicode literals to unicode."""
     assert helpers.to_str(u'ążśęćółń') == u'ążśęćółń'
     assert helpers.to_str(u'\u0105') == u'ą'
     assert helpers.to_str(u'\u0105\u017c\u017a\u0107') == u'ążźć'
     assert helpers.to_str({'a': 3}) == "{'a': 3}"
Exemplo n.º 3
0
 def test_to_str(self):
     u"""Tests for conversion of values to str."""
     assert helpers.to_str('') == ''
     assert helpers.to_str(5) == '5'
     assert helpers.to_str({'a': 3}) == "{'a': 3}"
Exemplo n.º 4
0
 def test__to_str__given_encoded_diacritics__should_return_unicode_string(self):
     u"""Tests for conversion of unicode literals to unicode."""
     assert helpers.to_str(u"ążśęćółń") == u"ążśęćółń"
     assert helpers.to_str(u"\u0105") == u"ą"
     assert helpers.to_str(u"\u0105\u017c\u017a\u0107") == u"ążźć"
     assert helpers.to_str({"a": 3}) == "{'a': 3}"
Exemplo n.º 5
0
 def test_to_str(self):
     u"""Tests for conversion of values to str."""
     assert helpers.to_str("") == ""
     assert helpers.to_str(5) == "5"
     assert helpers.to_str({"a": 3}) == "{'a': 3}"
Exemplo n.º 6
0
 def test__to_str__given_encoded_diacritics__should_return_unicode_string(
         self, value, expected):
     u"""Tests for conversion of unicode literals to unicode."""
     assert helpers.to_str(value) == expected
Exemplo n.º 7
0
 def test_to_str(self, value, expected):
     u"""Tests for conversion of values to str."""
     assert helpers.to_str(value) == expected
Exemplo n.º 8
0
 def test__to_str__given_encoded_diacritics__should_return_unicode_string(self, value, expected):
     u"""Tests for conversion of unicode literals to unicode."""
     assert helpers.to_str(value) == expected
Exemplo n.º 9
0
 def test_to_str(self, value, expected):
     u"""Tests for conversion of values to str."""
     assert helpers.to_str(value) == expected
Exemplo n.º 10
0
 def test_to_str(self):
     u"""Tests for conversion of values to str."""
     assert helpers.to_str('') == ''
     assert helpers.to_str(5) == '5'
     assert helpers.to_str({'a': 3}) == "{'a': 3}"