Пример #1
0
 def test_basic(self):
     workload_chart = WorkloadChart(self.env)
     self._insert_ticket('10', 'A')
     self._insert_ticket('20', 'B')
     self._insert_ticket('30', 'C')
     result = workload_chart.render_macro(self.req, "", "milestone=milestone1")
     self.assertEqual(result, u'<img src="http://chart.apis.google.com/chart?chs=400x100&amp;'\
                      'chd=t:10,30,20&amp;cht=p3&amp;chtt=Workload 60h (1 workdays left)&amp;'\
                      'chl=A 10h|C 30h|B 20h&amp;chco=ff9900" alt=\'Workload Chart\' />')
Пример #2
0
 def test_basic(self):
     workload_chart = WorkloadChart(self.env)
     self._insert_ticket('10', 'A')
     self._insert_ticket('20', 'B')
     self._insert_ticket('30', 'C')
     result = workload_chart.render_macro(self.req, "",
                                          "milestone=milestone1")
     self.assertEqual(result, u'<img src="http://chart.apis.google.com/chart?chs=400x100&amp;'\
                      'chd=t:10,30,20&amp;cht=p3&amp;chtt=Workload 60h (1 workdays left)&amp;'\
                      'chl=A 10h|C 30h|B 20h&amp;chco=ff9900" alt=\'Workload Chart\' />')
 def test_basic(self):
     workload_chart = WorkloadChart(self.env)
     self._insert_ticket('10', 'A')
     self._insert_ticket('20', 'B')
     self._insert_ticket('30', 'C')
     result = workload_chart.expand_macro(self.formatter, "", "milestone=milestone1")
     # remaining days will vary if unittest is run on workday or weekend... Ignore...
     result = str(result).replace('0+workdays+left', '1+workdays+left')
     self.assertEqual(result, '<image src="http://chart.googleapis.com/chart?'
             'chd=t%3A10%2C30%2C20&amp;chf=bg%2Cs%2C00000000&amp;chco=ff9900&amp;'
             'chl=A+10h%7CC+30h%7CB+20h&amp;chs=400x100&amp;cht=p3&amp;'
             'chtt=Workload+60h+%28%7E1+workdays+left%29" alt="Workload Chart (client)"/>')
Пример #4
0
 def test_basic(self):
     workload_chart = WorkloadChart(self.env)
     self._insert_ticket('10', 'A')
     self._insert_ticket('20', 'B')
     self._insert_ticket('30', 'C')
     result = workload_chart.expand_macro(self.formatter, "",
                                          "milestone=milestone1")
     # remaining days will vary if unittest is run on workday or weekend... Ignore...
     result = str(result).replace('0+workdays+left', '1+workdays+left')
     self.assertEqual(
         result, '<image src="http://chart.apis.google.com/chart?'
         'chd=t%3A10%2C30%2C20&amp;chf=bg%2Cs%2C00000000&amp;chco=ff9900&amp;'
         'chl=A+10h%7CC+30h%7CB+20h&amp;chs=400x100&amp;cht=p3&amp;'
         'chtt=Workload+60h+%28%7E1+workdays+left%29" alt="Workload Chart (client)"/>'
     )
 def test_username_obfuscation(self):
     workload_chart = WorkloadChart(self.env)
     self._insert_ticket('10', '*****@*****.**')
     result = workload_chart.expand_macro(self.formatter, "", "milestone=milestone1")
     self.failUnless("&amp;chl=user%40%E2%80%A6+10h&amp;" in str(result))
Пример #6
0
 def test_username_obfuscation(self):
     workload_chart = WorkloadChart(self.env)
     self._insert_ticket('10', '*****@*****.**')
     result = workload_chart.expand_macro(self.formatter, "",
                                          "milestone=milestone1")
     self.failUnless("&amp;chl=user%40%E2%80%A6+10h&amp;" in str(result))