Skip to content

Commit f3051ce

Browse files
committed
Add docs and improve tests
1 parent 9a95c4e commit f3051ce

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

docs/core_components.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Advanced Workflow API
4646
:show-inheritance:
4747
:members:
4848
urls,
49+
rankdir,
4950
get_graph_svg,
5051
get_instance_graph_svg,
5152
get_absolute_url,

joeflow/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class Workflow(models.Model, metaclass=WorkflowBase):
6767
modified = models.DateTimeField(auto_now=True, db_index=True)
6868

6969
rankdir = "LR"
70+
"""Direction of the workflow's graph visualization."""
7071

7172
task_set = GenericRelation(
7273
"joeflow.Task", object_id_field="_workflow_id", for_concrete_model=False

tests/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_get_graph(self, fixturedir):
114114
def test_change_graph_direction(self, fixturedir):
115115
workflows.SimpleWorkflow.rankdir = "TD"
116116
graph = workflows.SimpleWorkflow.get_graph()
117-
assert isinstance(graph, Digraph)
117+
assert 'rankdir=TD' in str(graph)
118118

119119
def test_get_graph_svg(self, fixturedir):
120120
svg = workflows.SimpleWorkflow.get_graph_svg()

0 commit comments

Comments
 (0)