MCPcopy Index your code
hub / github.com/Vanderhoof/PyDBML / test_example

Method test_example

test/test_docs.py:19–27  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17
18class TestDocs(TestCase):
19 def test_example(self) -> None:
20 results = PyDBML.parse_file(TEST_DOCS_PATH / 'example.dbml')
21 users, posts = results.tables
22 self.assertEqual([c.name for c in users.columns], ['id', 'username', 'role', 'created_at'])
23 self.assertEqual([c.name for c in posts.columns], ['id', 'title', 'body', 'user_id', 'created_at'])
24
25 self.assertEqual(len(results.refs), 1)
26 ref = results.refs[0]
27 self.assertEqual((posts, users), (ref.col1[0].table, ref.col2[0].table))
28
29 def test_project(self) -> None:
30 results = PyDBML.parse_file(TEST_DOCS_PATH / 'project.dbml')

Callers

nothing calls this directly

Calls 1

parse_fileMethod · 0.80

Tested by

no test coverage detected