Commits

Anonymous committed 3c6d1f9

[svn r9946] EstimationToolsPlugin: Fix 2 tests that broke when run on weekends... :-)

  • Participants
  • Parent commits 2073e5e

Comments (0)

Files changed (1)

File estimationtools/tests/workloadchart.py

         self._insert_ticket('20', 'B')
         self._insert_ticket('30', 'C')
         result = workload_chart.expand_macro(self.formatter, "", "milestone=milestone1")
-        self.assertEqual(str(result), '<image src="http://chart.apis.google.com/chart?'
+        # 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)"/>')
         self._insert_ticket('30', 'C')
         self._insert_ticket('xxx', 'D')
         result = workload_chart.expand_macro(self.formatter, "", "milestone=milestone1")
-        self.assertEqual(str(result), '<image src="http://chart.apis.google.com/chart?'
+        # 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)"/>')