Example #1
0
    def setUp(self):
        self.validinput = r'''
+--------+   +-------+    +-------+
|        | --+ ditaa +--> |       |
|  Text  |   +-------+    |diagram|
|Document|   |!magic!|    |       |
|     {d}|   |       |    |       |
+---+----+   +-------+    +-------+
    :                         ^
    |       Lots of work      |
    +-------------------------+
'''
        self.invalidinput = None  # ditaa seems to render anything ...


@tests.skipUnless(InsertSequenceDiagramPlugin.check_dependencies_ok(),
                  'Missing dependencies')
class TestSequenceDiagramEditor(TestImageGeneratorPluginMixin, tests.TestCase):

    plugin = 'sequencediagrameditor'
    object_types = ['image+seqdiagram']

    def setUp(self):
        self.validinput = r'''
seqdiag {
  browser  -> webserver [label = "GET /index.html"];
  browser <-- webserver;
  browser  -> webserver [label = "POST /blog/comment"];
              webserver  -> database [label = "INSERT comment"];
              webserver <-- database;
  browser <-- webserver;
|  Text  |   +-------+    |diagram|
|Document|   |!magic!|    |       |
|     {d}|   |       |    |       |
+---+----+   +-------+    +-------+
    :                         ^
    |       Lots of work      |
    +-------------------------+
'''
		self.invalidinput = None # ditaa seems to render anything ...

	def runTest(self):
		'Test Ditaa Editor plugin'
		TestGenerator._test_generator(self)


@tests.skipUnless(InsertSequenceDiagramPlugin.check_dependencies_ok(), 'Missing dependencies')
class TestSequenceDiagramEditor(TestGenerator):

	pluginklass = InsertSequenceDiagramPlugin
	generatorklass = SequenceDiagramGenerator

	def setUp(self):
		self.validinput = r'''
seqdiag {
  browser  -> webserver [label = "GET /index.html"];
  browser <-- webserver;
  browser  -> webserver [label = "POST /blog/comment"];
              webserver  -> database [label = "INSERT comment"];
              webserver <-- database;
  browser <-- webserver;
}