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')
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')