コード例 #1
0
 def test_chart_not_found(self):
     """
     Make sure asking for a non-existant chart throws an appropriate error
     """
     with self.assertRaises(api.ChartNotFoundError):
         chart = api.get_chart(self.request, 'google_charts_report',
                               'delicious_pie_chart')
コード例 #2
0
 def test_internal_api_get(self):
     """
     Test the internal get_chart function
     """
     chart = api.get_chart(self.request, 'google_charts_report', 'pie_chart')
     chart_html = u'%s' % chart
     self.assertRegexpMatches(chart_html, r'google\.visualization\.PieChart')
コード例 #3
0
 def test_internal_api_get(self):
     """
     Test the internal get_chart function
     """
     chart = api.get_chart(self.request, 'google_charts_report',
                           'pie_chart')
     chart_html = u'%s' % chart
     self.assertRegexpMatches(chart_html,
                              r'google\.visualization\.PieChart')
コード例 #4
0
 def test_chart_not_found(self):
     """
     Make sure asking for a non-existant chart throws an appropriate error
     """
     with self.assertRaises(api.ChartNotFoundError):
         chart = api.get_chart(self.request, 'google_charts_report', 'delicious_pie_chart')