-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get view names along with tables #498
Changes from all commits
ef805d9
2cdcb57
a00b63d
f9ae6e7
c7a7836
7497b4f
3ac8aad
ccf70ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "great_expectations_cloud" | ||
version = "20241017.0.dev1" | ||
version = "20241021.0.dev0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. outdated |
||
description = "Great Expectations Cloud" | ||
authors = ["The Great Expectations Team <[email protected]>"] | ||
repository = "https://github.com/great-expectations/cloud" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,7 +170,9 @@ def test_test_draft_datasource_config_success_sql_ds( | |
assert action_result.created_resources == [] | ||
|
||
# assert that the action properly calls helper methods to get table names and update the draft config | ||
_get_table_names_spy.assert_called_with(datasource=datasource_cls(**datasource_config)) | ||
_get_table_names_spy.assert_called_with( | ||
datasource=datasource_cls(**datasource_config), include_views=True | ||
) | ||
_update_table_names_list_spy.assert_called_with(config_id=config_id, table_names=table_names) | ||
Comment on lines
+173
to
176
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These assertions don't add any value to the test and make refactoring harder. Testing that a method calls a private helper makes no guarantee that what the helper is doing is correct. These tests is already verifying that the correct endpoint is called with the correct tables/views and that is enough There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some tests here should guarantee that we return views as well |
||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,8 +105,10 @@ def test_run_list_table_names_action_returns_action_result( | |
) | ||
|
||
table_names = ["table_1", "table_2", "table_3"] | ||
view_names = ["view_1", "view_2"] | ||
inspector = mocker.Mock(spec=Inspector) | ||
inspector.get_table_names.return_value = table_names | ||
inspector.get_view_names.return_value = view_names | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would expect this test to fail since we're not getting different results. The test should guarantee that we're sending back the correct results |
||
|
||
mock_inspect.return_value = inspector | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to
_get_table_and_view_names
and remove the boolean flag. We don't have a need for the conditional and it makes the API less clear.