diff --git a/mypy-baseline.txt b/mypy-baseline.txt index 20f0a8a90b3d7..97ad2d3ed57bc 100644 --- a/mypy-baseline.txt +++ b/mypy-baseline.txt @@ -651,10 +651,6 @@ posthog/hogql/database/schema/test/test_channel_type.py:0: error: Value of type posthog/api/organization_member.py:0: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc] ee/api/feature_flag_role_access.py:0: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc] ee/clickhouse/views/insights.py:0: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc] -posthog/temporal/tests/external_data/test_external_data_job.py:0: error: Missing positional argument "table_schema" in call to "ValidateSchemaInputs" [call-arg] -posthog/temporal/tests/external_data/test_external_data_job.py:0: error: Missing positional argument "table_schema" in call to "ValidateSchemaInputs" [call-arg] -posthog/temporal/tests/external_data/test_external_data_job.py:0: error: Missing positional argument "table_schema" in call to "ValidateSchemaInputs" [call-arg] -posthog/temporal/tests/external_data/test_external_data_job.py:0: error: Missing positional argument "table_schema" in call to "ValidateSchemaInputs" [call-arg] posthog/queries/trends/test/test_person.py:0: error: "str" has no attribute "get" [attr-defined] posthog/queries/trends/test/test_person.py:0: error: Invalid index type "int" for "HttpResponse"; expected type "str | bytes" [index] posthog/queries/trends/test/test_person.py:0: error: "str" has no attribute "get" [attr-defined] diff --git a/posthog/temporal/tests/external_data/test_external_data_job.py b/posthog/temporal/tests/external_data/test_external_data_job.py index 29555192bb90e..9f0ca2d9a0d32 100644 --- a/posthog/temporal/tests/external_data/test_external_data_job.py +++ b/posthog/temporal/tests/external_data/test_external_data_job.py @@ -511,7 +511,18 @@ async def test_validate_schema_and_update_table_activity(activity_environment, t mock_get_columns.return_value = {"id": "string"} await activity_environment.run( validate_schema_activity, - ValidateSchemaInputs(run_id=new_job.pk, team_id=team.id, schemas=schemas), + ValidateSchemaInputs( + run_id=new_job.pk, + team_id=team.id, + schemas=schemas, + table_schema={ + "test-1": {"name": "test-1", "resource": "test-1", "columns": {"id": {"data_type": "text"}}}, + "test-2": {"name": "test-2", "resource": "test-2", "columns": {"id": {"data_type": "text"}}}, + "test-3": {"name": "test-3", "resource": "test-3", "columns": {"id": {"data_type": "text"}}}, + "test-4": {"name": "test-4", "resource": "test-4", "columns": {"id": {"data_type": "text"}}}, + "test-5": {"name": "test-5", "resource": "test-5", "columns": {"id": {"data_type": "text"}}}, + }, + ), ) assert mock_get_columns.call_count == 10 @@ -584,7 +595,18 @@ async def test_validate_schema_and_update_table_activity_with_existing(activity_ mock_get_columns.return_value = {"id": "string"} await activity_environment.run( validate_schema_activity, - ValidateSchemaInputs(run_id=new_job.pk, team_id=team.id, schemas=schemas), + ValidateSchemaInputs( + run_id=new_job.pk, + team_id=team.id, + schemas=schemas, + table_schema={ + "test-1": {"name": "test-1", "resource": "test-1", "columns": {"id": {"data_type": "text"}}}, + "test-2": {"name": "test-2", "resource": "test-2", "columns": {"id": {"data_type": "text"}}}, + "test-3": {"name": "test-3", "resource": "test-3", "columns": {"id": {"data_type": "text"}}}, + "test-4": {"name": "test-4", "resource": "test-4", "columns": {"id": {"data_type": "text"}}}, + "test-5": {"name": "test-5", "resource": "test-5", "columns": {"id": {"data_type": "text"}}}, + }, + ), ) assert mock_get_columns.call_count == 10 @@ -640,7 +662,23 @@ async def test_validate_schema_and_update_table_activity_half_run(activity_envir await activity_environment.run( validate_schema_activity, - ValidateSchemaInputs(run_id=new_job.pk, team_id=team.id, schemas=schemas), + ValidateSchemaInputs( + run_id=new_job.pk, + team_id=team.id, + schemas=schemas, + table_schema={ + "broken_schema": { + "name": "broken_schema", + "resource": "broken_schema", + "columns": {"id": {"data_type": "text"}}, + }, + "test_schema": { + "name": "test_schema", + "resource": "test_schema", + "columns": {"id": {"data_type": "text"}}, + }, + }, + ), ) assert mock_get_columns.call_count == 1 @@ -688,7 +726,18 @@ async def test_create_schema_activity(activity_environment, team, **kwargs): mock_get_columns.return_value = {"id": "string"} await activity_environment.run( validate_schema_activity, - ValidateSchemaInputs(run_id=new_job.pk, team_id=team.id, schemas=schemas), + ValidateSchemaInputs( + run_id=new_job.pk, + team_id=team.id, + schemas=schemas, + table_schema={ + "test-1": {"name": "test-1", "resource": "test-1", "columns": {"id": {"data_type": "text"}}}, + "test-2": {"name": "test-2", "resource": "test-2", "columns": {"id": {"data_type": "text"}}}, + "test-3": {"name": "test-3", "resource": "test-3", "columns": {"id": {"data_type": "text"}}}, + "test-4": {"name": "test-4", "resource": "test-4", "columns": {"id": {"data_type": "text"}}}, + "test-5": {"name": "test-5", "resource": "test-5", "columns": {"id": {"data_type": "text"}}}, + }, + ), ) assert mock_get_columns.call_count == 10