Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tedivm committed Dec 30, 2023
1 parent 534323f commit 0a0064e
Showing 1 changed file with 9 additions and 34 deletions.
43 changes: 9 additions & 34 deletions tests/transformers/test_dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,14 @@ def test_mermaid(metaclass):
mermaid = Dot(metaclass=metaclass)
graph_string = str(mermaid)

assert (
'<tr><td colspan="3" bgcolor="lightblue"><b>users</b></td></tr>' in graph_string
)
assert (
'<tr><td colspan="3" bgcolor="lightblue"><b>posts</b></td></tr>' in graph_string
)
assert (
'<tr><td colspan="3" bgcolor="lightblue"><b>comments</b></td></tr>'
in graph_string
)
assert '<tr><td colspan="3" bgcolor="lightblue"><b>users</b></td></tr>' in graph_string
assert '<tr><td colspan="3" bgcolor="lightblue"><b>posts</b></td></tr>' in graph_string
assert '<tr><td colspan="3" bgcolor="lightblue"><b>comments</b></td></tr>' in graph_string

assert (
"users -- posts [arrowhead=crow, arrowtail=none, dir=both, label=author];"
in graph_string
)
assert (
"posts -- comments [arrowhead=crow, arrowtail=none, dir=both, label=post];"
in graph_string
)
assert (
"users -- comments [arrowhead=crow, arrowtail=none, dir=both, label=author];"
in graph_string
)
assert "users -- posts [arrowhead=crow, arrowtail=none, dir=both, label=author];" in graph_string
assert "posts -- comments [arrowhead=crow, arrowtail=none, dir=both, label=post];" in graph_string
assert "users -- comments [arrowhead=crow, arrowtail=none, dir=both, label=author];" in graph_string

assert (
'<tr><td align="left">CHAR(32)</td><td align="left">author</td><td>Foreign Key</td></tr>'
in graph_string
)
assert (
'<tr><td align="left">CHAR(32)</td><td align="left">post</td><td>Foreign Key</td></tr>'
in graph_string
)
assert (
'<tr><td align="left">DATETIME</td><td align="left">created</td><td></td></tr>'
in graph_string
)
assert '<tr><td align="left">CHAR(32)</td><td align="left">author</td><td>Foreign Key</td></tr>' in graph_string
assert '<tr><td align="left">CHAR(32)</td><td align="left">post</td><td>Foreign Key</td></tr>' in graph_string
assert '<tr><td align="left">DATETIME</td><td align="left">created</td><td></td></tr>' in graph_string

0 comments on commit 0a0064e

Please sign in to comment.