~ubuntuone-hackers/ubuntu-rest-scopes/trunk

« back to all changes in this revision

Viewing changes to src/tests/test_translator.py

  • Committer: Facundo Batista
  • Date: 2016-06-07 14:01:21 UTC
  • mfrom: (508.2.9 ubuntu-rest-scopes)
  • mto: This revision was merged to the branch mainline in revision 527.
  • Revision ID: facundo@taniquetil.com.ar-20160607140121-id1tzsnaa1lwtrb8
MergedĀ lp:~jamesh/ubuntu-rest-scopes/multi-column

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        self.assertNotIn(u'foo', gc)
52
52
        self.assertEqual(gc[u'foo'], u'translated')
53
53
        trans.ugettext.assert_called_with('foo')
54
 
        trans.ugettext.assert_calling_count(1)
 
54
        self.assertEqual(1, trans.ugettext.call_count)
55
55
 
56
56
        # second time it should be cached
57
57
        self.assertIn(u'foo', gc)
58
58
        self.assertEqual(gc[u'foo'], u'translated')
59
 
        trans.ugettext.assert_calling_count(1)  # not called again
 
59
        self.assertEqual(1, trans.ugettext.call_count)
60
60
 
61
61
    def test_gettextcaching_missinglanguage(self):
62
62
        # let's get a cache for an unknown language