@@ -0,0 +1,1534 @@
+from django.contrib.contenttypes.models import ContentType%0Afrom django.test import TestCase%0A%0Afrom dcim.models import Site%0Afrom extras.choices import ExportTemplateLanguageChoices%0Afrom extras.models import Graph%0A%0A%0Aclass GraphTest(TestCase):%0A%0A    def setUp(self):%0A%0A        self.site = Site(name='Site 1', slug='site-1')%0A%0A    def test_graph_render_django(self):%0A%0A        # Using the pluralize filter as a sanity check (it's only available in Django)%0A        TEMPLATE_TEXT = %22%7B%7B obj.name%7Clower %7D%7D thing%7B%7B 2%7Cpluralize %7D%7D%22%0A        RENDERED_TEXT = %22site 1 things%22%0A%0A        graph = Graph(%0A            type=ContentType.objects.get(app_label='dcim', model='site'),%0A            name='Graph 1',%0A            template_language=ExportTemplateLanguageChoices.LANGUAGE_DJANGO,%0A            source=TEMPLATE_TEXT,%0A            link=TEMPLATE_TEXT%0A        )%0A%0A        self.assertEqual(graph.embed_url(self.site), RENDERED_TEXT)%0A        self.assertEqual(graph.embed_link(self.site), RENDERED_TEXT)%0A%0A    def test_graph_render_jinja2(self):%0A%0A        TEMPLATE_TEXT = %22%7B%7B %5Bobj.name, obj.slug%5D%7Cjoin(',') %7D%7D%22%0A        RENDERED_TEXT = %22Site 1,site-1%22%0A%0A        graph = Graph(%0A            type=ContentType.objects.get(app_label='dcim', model='site'),%0A            name='Graph 1',%0A            template_language=ExportTemplateLanguageChoices.LANGUAGE_JINJA2,%0A            source=TEMPLATE_TEXT,%0A            link=TEMPLATE_TEXT%0A        )%0A%0A        self.assertEqual(graph.embed_url(self.site), RENDERED_TEXT)%0A        self.assertEqual(graph.embed_link(self.site), RENDERED_TEXT)%0A

Add tests for Graph rendering