-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: added label in edge verification; added fill dump function
- Loading branch information
Showing
4 changed files
with
70 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from multicloud_diagrams import MultiCloudDiagrams | ||
|
||
from utils.utils import TestUtilities | ||
import xml.etree.ElementTree as Et | ||
|
||
|
||
class TestMCDList(TestUtilities): | ||
|
||
def test_list(self): | ||
# given | ||
table_name = 'prod-dynamo-table' | ||
# table_arn = 'arn:aws:dynamodb:eu-west-1:123456789012:table/prod-dynamo-table' | ||
mcd = MultiCloudDiagrams() | ||
rows_keys = [ | ||
'First: row', | ||
'Second: row' | ||
] | ||
|
||
# when | ||
mcd.add_list(table_name=f'Schema:{table_name}', rows=rows_keys) | ||
mcd.dump() | ||
# then | ||
|
||
tree = Et.ElementTree(mcd.mx_file) | ||
self.verify_mxfile_default(tree) | ||
|
||
mx_cells = tree.findall("./*/*/*/") | ||
self.assertEqual(5, len(mx_cells)) | ||
self.verify_mx_cell(mx_cells[0], expected={'id': '0'}) | ||
self.verify_mx_cell(mx_cells[1], expected={'id': '1', 'parent': '0'}) | ||
|
||
# TODO finish test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters