Unverified Commit 9f35efc0 authored by Dorian Johnson's avatar Dorian Johnson Committed by GitHub

chore: fix test failure (#797)

* chore: fix test failure

This error was introduced in https://github.com/amundsen-io/amundsenfrontendlibrary/commit/0b47694ea74cbbef34e03eb45f29643b16a1332a

I do not understand why that changeset passed CI (it shouldn't have), but
once it landed into master it didn't. But regardless, fix
Signed-off-by: 's avatarDorian Johnson <2020@dorianj.net>

* chore: fix lint errors
Signed-off-by: 's avatarDorian Johnson <2020@dorianj.net>
parent a564a326
...@@ -14,8 +14,8 @@ from amundsen_application.log.action_log import action_logging ...@@ -14,8 +14,8 @@ from amundsen_application.log.action_log import action_logging
from amundsen_application.models.user import load_user, dump_user from amundsen_application.models.user import load_user, dump_user
from amundsen_application.api.utils.metadata_utils import is_table_editable, marshall_table_partial,\ from amundsen_application.api.utils.metadata_utils import is_table_editable, marshall_table_partial, \
marshall_table_full,marshall_dashboard_partial, marshall_dashboard_full, TableUri marshall_table_full, marshall_dashboard_partial, marshall_dashboard_full, TableUri
from amundsen_application.api.utils.request_utils import get_query_param, request_metadata from amundsen_application.api.utils.request_utils import get_query_param, request_metadata
......
...@@ -83,7 +83,7 @@ def _parse_editable_rule(rule: MatchRuleObject, ...@@ -83,7 +83,7 @@ def _parse_editable_rule(rule: MatchRuleObject,
return True return True
def is_table_editable(schema_name: str, table_name: str, cfg: any=None) -> bool: def is_table_editable(schema_name: str, table_name: str, cfg: Any = None) -> bool:
if cfg is None: if cfg is None:
cfg = app.config cfg = app.config
...@@ -109,7 +109,8 @@ def marshall_table_full(table_dict: Dict) -> Dict: ...@@ -109,7 +109,8 @@ def marshall_table_full(table_dict: Dict) -> Dict:
table: Table = schema.load(table_dict).data table: Table = schema.load(table_dict).data
results: Dict[str, Any] = schema.dump(table).data results: Dict[str, Any] = schema.dump(table).data
results['is_editable'] = is_table_editable(results['schema'], results['name']) is_editable = is_table_editable(results['schema'], results['name'])
results['is_editable'] = is_editable
# TODO - Cleanup https://github.com/lyft/amundsen/issues/296 # TODO - Cleanup https://github.com/lyft/amundsen/issues/296
# This code will try to supplement some missing data since the data here is incomplete. # This code will try to supplement some missing data since the data here is incomplete.
......
...@@ -747,7 +747,6 @@ class MetadataTest(unittest.TestCase): ...@@ -747,7 +747,6 @@ class MetadataTest(unittest.TestCase):
) )
self.assertEqual(response.status_code, HTTPStatus.OK) self.assertEqual(response.status_code, HTTPStatus.OK)
@responses.activate @responses.activate
def test_put_column_description_denied(self) -> None: def test_put_column_description_denied(self) -> None:
""" """
......
...@@ -178,7 +178,6 @@ class TableEditabilityWrapper(unittest.TestCase): ...@@ -178,7 +178,6 @@ class TableEditabilityWrapper(unittest.TestCase):
self.assertTrue(is_table_editable('not_uneditable_schema', 'anytable', mockConfig)) self.assertTrue(is_table_editable('not_uneditable_schema', 'anytable', mockConfig))
self.assertFalse(is_table_editable('uneditable_schema', 'anytable', mockConfig)) self.assertFalse(is_table_editable('uneditable_schema', 'anytable', mockConfig))
def test_schema_table_match_rule(self) -> None: def test_schema_table_match_rule(self) -> None:
mockConfig = { mockConfig = {
'UNEDITABLE_SCHEMAS': [''], 'UNEDITABLE_SCHEMAS': [''],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment