Skip to content

Commit

Permalink
Include test for --include-only
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCurtis committed Feb 1, 2024
1 parent d6c2963 commit df48021
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,19 @@ def test_errors_if_neither_demo_or_connection_string_included(self):
"Exactly one of --demo and --connection-string should be used.",
completed_process.stderr
)

def test_can_pass_in_list_of_tables_to_include(self):
command = (
"fk-graph"
" --demo"
" --table=table_a"
" --primary-key=1"
" --include-only=\"['table_a']\""
)
# PIPE just stops stdout from printing to screen.
process = Popen(shlex_split(command), stdout=PIPE)
self.addCleanup(process.terminate)
response = self.session.get("http://localhost:8050")
# Because of the javascripty-nature of the app, we can
# only really inspect the status code.
self.assertEqual(response.status_code, 200)

0 comments on commit df48021

Please sign in to comment.