Exemplo n.º 1
0
 def setUp(self):
     self.expected_result = 6
     self.expected_example = [
         ' + '.join([_('g.year').upper(),
                     _('g.month').upper()]),
         '1984 + 11 → ' + str(self.expected_result)
     ]
Exemplo n.º 2
0
 def setUp(self):
     self.expected_result = 3
     self.expected_example = [
         ' + '.join([_('g.action_1').upper(),
                     _('g.action_2').upper()]),
         '5 + 7 → ' + str(self.expected_result)
     ]
Exemplo n.º 3
0
 def setUp(self):
     self.expected_result = 7
     self.expected_example = [
         ' + '.join([_('g.year').upper(),
                     _('g.day').upper()]),
         '1984 + 21 → ' + str(self.expected_result)
     ]
Exemplo n.º 4
0
 def setUp(self):
     self.expected_result = 5
     self.expected_example = [
         ' + '.join([_('g.month').upper(),
                     _('g.day').upper()]),
         '11 + 21 → ' + str(self.expected_result)
     ]
Exemplo n.º 5
0
 def test_example_lifepath(self):
     """ The example should respect a certain format """
     self.assertEqual([
         ' + '.join([
             _('g.year').upper(),
             _('g.month').upper(),
             _('g.day').upper()
         ]), '1984 + 11 + 21 → ' + str(self.expected_result)
     ], self.method.example)
Exemplo n.º 6
0
 def setUp(self):
     self.method.today = date(2013, 4, 25)
     self.expected_result = 3
     self.expected_example = [
         ' + '.join([
             _('g.u_year').upper(),
             _('g.month').upper(),
             _('g.day').upper()
         ]), '2014 + 11 + 21 → ' + str(self.expected_result)
     ]
Exemplo n.º 7
0
def pythonic_apples(request):
    return render_to_response(
        "apples_python.html", {
            "rendered":
            u"<h1>{0}</h1>"
            "<p>{1}</p>"
            "<p>{2}</p>"
            "<p>{3}</p>".format(_("apples.header"),
                                _("apples.want_some", {"fruits": "apples"}),
                                transchoice("apples.praise_n", 1),
                                transchoice("apples.praise_n", 3))
        })
Exemplo n.º 8
0
def pythonic_apples(request):
    return render_to_response("apples_python.html", {"rendered": 
        u"<h1>{0}</h1>"
        "<p>{1}</p>"
        "<p>{2}</p>"
        "<p>{3}</p>".format(
            _("apples.header"),
            _("apples.want_some", {"fruits": "apples"}),
            transchoice("apples.praise_n", 1),
            transchoice("apples.praise_n", 3)
        )
    })
Exemplo n.º 9
0
 def setUp(self):
     self.expected_result = 22
     self.expected_example = [
         _('g.year').upper(), '1984 → ' + str(self.expected_result)
     ]
Exemplo n.º 10
0
 def setUp(self):
     self.expected_result = 3
     self.expected_example = [
         _('g.day').upper(), '21 → ' + str(self.expected_result)
     ]
Exemplo n.º 11
0
 def setUp(self):
     self.expected_result = 11
     self.expected_example = [
         _('g.month').upper(), '11 → ' + str(self.expected_result)
     ]