              self.assertEqual(t_plur.render(Context({'percent': 42, 'num': 1})), '%(percent)s% represents 1 object')
              self.assertEqual(t_plur.render(Context({'percent': 42, 'num': 4})), '%(percent)s% represents 4 objects')
  
  
  class ResolutionOrderI18NTests(TestCase):
  
      def setUp(self):
          # Okay, this is brutal, but we have no other choice to fully reset
          # the translation framework
          trans_real._active = local()
 
</s> remove         # Okay, this is brutal, but we have no other choice to fully reset
        # the translation framework
        trans_real._active = local()
        trans_real._translations = {}
 </s> add         super(ResolutionOrderI18NTests, self).setUp() </s> remove class LocaleMiddlewareTests(TestCase):
 </s> add class LocaleMiddlewareTests(TransRealMixin, TestCase):
class ResolutionOrderI18NTests(TransRealMixin, TestCase):
              self.assertEqual(t_plur.render(Context({'percent': 42, 'num': 1})), '%(percent)s% represents 1 object')
              self.assertEqual(t_plur.render(Context({'percent': 42, 'num': 4})), '%(percent)s% represents 4 objects')
  
  
class ResolutionOrderI18NTests(TransRealMixin, TestCase):
  
      def setUp(self):
          # Okay, this is brutal, but we have no other choice to fully reset
          # the translation framework
          trans_real._active = local()
keep keep keep keep replace keep keep keep keep keep
 Added TransRealMixin to fix i18n global state pollution in the test suite 
tests/i18n/tests.py