MCPcopy Create free account
hub / github.com/Vanderhoof/PyDBML / test_relationships_composite

Method test_relationships_composite

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

Source from the content-addressed store, hash-verified

163 self.assertEqual(rf[1].type, '<')
164
165 def test_relationships_composite(self) -> None:
166 results = PyDBML.parse_file(TEST_DOCS_PATH / 'relationships_composite.dbml')
167 merchant_periods, merchants = results.tables
168
169 rf = results.refs
170
171 self.assertEqual(len(rf), 1)
172
173 self.assertEqual(rf[0].col1[0].table, merchant_periods)
174 self.assertEqual(rf[0].col2[0].table, merchants)
175 self.assertEqual(rf[0].type, '>')
176 self.assertEqual(
177 rf[0].col1,
178 [
179 merchant_periods['merchant_id'],
180 merchant_periods['country_code'],
181 ]
182 )
183 self.assertEqual(
184 rf[0].col2,
185 [
186 merchants['id'],
187 merchants['country_code'],
188 ]
189 )
190
191 def test_relationship_settings(self) -> None:
192 results = PyDBML.parse_file(TEST_DOCS_PATH / 'relationship_settings.dbml')

Callers

nothing calls this directly

Calls 1

parse_fileMethod · 0.80

Tested by

no test coverage detected