コード例 #1
0
 def test_same_translation(self):
     expected = 'Out of memory'
     actual = translate_message('Out of memory')
     assert actual == expected
コード例 #2
0
ファイル: test_errorlocale.py プロジェクト: liang0/sentry-1
 def test_basic_translation(self):
     actual = "Type mismatch"
     expected = translate_message("Typenkonflikt")
     assert actual == expected
コード例 #3
0
 def test_unicode_translation(self):
     expected = 'Division by zero'
     actual = translate_message(u'Divisi\xf3n por cero')
     assert actual == expected
コード例 #4
0
 def test_interpolated_translation_with_type_and_colon(self):
     expected = 'ReferenceError: Cannot modify property \'foo\': \'length\' is not writable'
     actual = translate_message(
         u'ReferenceError: Nie mo\u017cna zmodyfikowa\u0107 w\u0142a\u015bciwo\u015bci \u201efoo\u201d: warto\u015b\u0107 \u201elength\u201d jest niezapisywalna'
     )
     assert actual == expected
コード例 #5
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_same_translation(self):
     expected = 'Out of memory'
     actual = translate_message('Out of memory')
     assert actual == expected
コード例 #6
0
 def test_translation_with_type_and_colon(self):
     expected = 'RangeError: Cannot define property: object is not extensible'
     actual = translate_message(
         u'RangeError: Nie mo\u017cna zdefiniowa\u0107 w\u0142a\u015bciwo\u015bci: obiekt nie jest rozszerzalny'
     )
     assert actual == expected
コード例 #7
0
 def test_interpolated_translation_with_colon_in_front(self):
     expected = 'foo: an unexpected failure occurred while trying to obtain metadata information'
     actual = translate_message(
         u'foo: wyst\u0105pi\u0142 nieoczekiwany b\u0142\u0105d podczas pr\xf3by uzyskania informacji o metadanych'
     )
     assert actual == expected
コード例 #8
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_interpolated_translation_with_type(self):
     expected = 'TypeError: Type \'foo\' not found'
     actual = translate_message(u'TypeError: Nie odnaleziono typu \u201efoo\u201d')
     assert actual == expected
コード例 #9
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_interpolated_translation_with_type_and_colon(self):
     expected = 'ReferenceError: Cannot modify property \'foo\': \'length\' is not writable'
     actual = translate_message(
         u'ReferenceError: Nie mo\u017cna zmodyfikowa\u0107 w\u0142a\u015bciwo\u015bci \u201efoo\u201d: warto\u015b\u0107 \u201elength\u201d jest niezapisywalna')
     assert actual == expected
コード例 #10
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_interpolated_translation_with_colon(self):
     expected = '\'this\' is not of expected type: foo'
     actual = translate_message(
         u'Typ obiektu \u201ethis\u201d jest inny ni\u017c oczekiwany: foo')
     assert actual == expected
コード例 #11
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_interpolated_translation_with_colon_in_front(self):
     expected = 'foo: an unexpected failure occurred while trying to obtain metadata information'
     actual = translate_message(
         u'foo: wyst\u0105pi\u0142 nieoczekiwany b\u0142\u0105d podczas pr\xf3by uzyskania informacji o metadanych')
     assert actual == expected
コード例 #12
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_translation_with_type_and_colon(self):
     expected = 'RangeError: Cannot define property: object is not extensible'
     actual = translate_message(
         u'RangeError: Nie mo\u017cna zdefiniowa\u0107 w\u0142a\u015bciwo\u015bci: obiekt nie jest rozszerzalny')
     assert actual == expected
コード例 #13
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_translation_with_type(self):
     expected = 'RangeError: Subscript out of range'
     actual = translate_message('RangeError: Indeks poza zakresem')
     assert actual == expected
コード例 #14
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_unknown_translation(self):
     expected = 'Some unknown message'
     actual = translate_message('Some unknown message')
     assert actual == expected
コード例 #15
0
 def test_unknown_translation(self):
     expected = 'Some unknown message'
     actual = translate_message('Some unknown message')
     assert actual == expected
コード例 #16
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_basic_translation(self):
     actual = 'Type mismatch'
     expected = translate_message('Typenkonflikt')
     assert actual == expected
コード例 #17
0
 def test_translation_with_type(self):
     expected = 'RangeError: Subscript out of range'
     actual = translate_message('RangeError: Indeks poza zakresem')
     assert actual == expected
コード例 #18
0
ファイル: test_errorlocale.py プロジェクト: liang0/sentry-1
 def test_same_translation(self):
     expected = "Out of memory"
     actual = translate_message("Out of memory")
     assert actual == expected
コード例 #19
0
 def test_interpolated_translation_with_colon(self):
     expected = '\'this\' is not of expected type: foo'
     actual = translate_message(
         u'Typ obiektu \u201ethis\u201d jest inny ni\u017c oczekiwany: foo')
     assert actual == expected
コード例 #20
0
ファイル: test_errorlocale.py プロジェクト: liang0/sentry-1
 def test_unknown_translation(self):
     expected = "Some unknown message"
     actual = translate_message("Some unknown message")
     assert actual == expected
コード例 #21
0
 def test_interpolated_translation_with_type(self):
     expected = 'TypeError: Type \'foo\' not found'
     actual = translate_message(
         u'TypeError: Nie odnaleziono typu \u201efoo\u201d')
     assert actual == expected
コード例 #22
0
ファイル: test_errorlocale.py プロジェクト: liang0/sentry-1
 def test_interpolated_translation_with_type(self):
     expected = "TypeError: Type 'foo' not found"
     actual = translate_message(
         "TypeError: Nie odnaleziono typu \u201efoo\u201d")
     assert actual == expected
コード例 #23
0
 def test_basic_translation(self):
     actual = 'Type mismatch'
     expected = translate_message('Typenkonflikt')
     assert actual == expected
コード例 #24
0
ファイル: test_errorlocale.py プロジェクト: Kayle009/sentry
 def test_unicode_translation(self):
     expected = 'Division by zero'
     actual = translate_message(u'Divisi\xf3n por cero')
     assert actual == expected