Example #1
0
    def test_visualization_view_render_template(self):
        category_ = Category()
        category_.name = 'Test category'
        category_.save()
        embedded_ = EmbeddedVisualization()
        embedded_.category_id = category_.pk
        embedded_.name = 'Visualization Test'
        embedded_.save()

        response = self.client.get('/visualization/%s/' % embedded_.slug)
        self.assertTemplateUsed(response, 'embedded_visualization.html')
Example #2
0
 def test_get_absolute_url(self):
     category_ = Category.objects.create()
     embedded_ = EmbeddedVisualization()
     embedded_.category_id = category_.pk
     embedded_.name = 'Visualization Test'
     embedded_.save()
     self.assertEquals(embedded_.get_absolute_url(), '/visualization/%s/' % (embedded_.slug,))