def test_system_exit(self):
     with fixture.locale_context('ja_JP.UTF-8'):
         try:
             with fixture.Capture(silent=True):
                 managercli.system_exit(1, _("'%s' is not a valid serial number") % "123123")
         except SystemExit:
             # tis okay, we are looking for unicode errors on the string encode
             pass
예제 #2
0
    def test(self):
        report = repolib.RepoActionReport()
        repo = self._repo(u'a-unicode-content-label', u'A unicode repo name')
        report.repo_updates.append(repo)
        report.repo_added.append(repo)
        deleted_section = u'einige-repo-name'
        deleted_section_2 = u'一些回購名稱'
        report.repo_deleted = [deleted_section, deleted_section_2]

        # okay as long as no UnicodeErrors
        str(report)

        with fixture.locale_context('de_DE.utf8'):
            str(report)
예제 #3
0
    def test(self):
        report = repolib.RepoActionReport()
        repo = self._repo(u'a-unicode-content-label', u'A unicode repo name')
        report.repo_updates.append(repo)
        report.repo_added.append(repo)
        deleted_section = u'einige-repo-name'
        deleted_section_2 = u'一些回購名稱'
        report.repo_deleted = [deleted_section, deleted_section_2]

        # okay as long as no UnicodeErrors
        str(report)

        with fixture.locale_context('de_DE.utf8'):
            str(report)
    def test(self):
        r = entcertlib.EntCertUpdateReport()
        r.expected = u'12312'
        r.valid = [u'2342∰']
        r.added.append(self._stub_cert())
        r.rogue.append(self._stub_cert())

        # an UnicodeError will fail the tests
        report_str = str(r)
        '%s' % report_str

        with fixture.locale_context('de_DE.utf8'):
            report_str = str(r)
            '%s' % r
    def test(self):
        report = repolib.RepoActionReport()
        repo = self._repo(u"a-unicode-content-label", u"A unicode repo name")
        report.repo_updates.append(repo)
        report.repo_added.append(repo)
        deleted_section = u"einige-repo-name"
        deleted_section_2 = u"一些回購名稱"
        report.repo_deleted = [deleted_section, deleted_section_2]

        # okay as long as no UnicodeErrors
        str(report)

        with fixture.locale_context("de_DE.utf8"):
            str(report)
예제 #6
0
    def test(self):
        r = entcertlib.EntCertUpdateReport()
        r.expected = u'12312'
        r.valid = [u'2342∰']
        r.added.append(self._stub_cert())
        r.rogue.append(self._stub_cert())

        # an UnicodeError will fail the tests
        report_str = unicode(r)
        '%s' % report_str

        with fixture.locale_context('de_DE.utf8'):
            report_str = unicode(r)
            '%s' % r
 def test_ja_not_serial(self):
     with fixture.locale_context('ja_JP.UTF-8'):
         msg = _("'%s' is not a valid serial number") % "123123"
         unicode(to_unicode_or_bust(msg)).encode("UTF-8") + '\n'
 def test_pos(self):
     for lang in self.test_locales:
         l = "%s.utf8" % lang
         with fixture.locale_context(l):
             '%s' % _("Unable to find available subscriptions for all your installed products.")