Skip to content

Commit

Permalink
include numbers table in python test
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Sep 25, 2023
1 parent 176bbf1 commit 02cd0c4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions posthog/hogql/database/test/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ def test_can_select_from_each_table_at_all(self, poe_enabled: bool) -> None:
serialized_database = serialize_database(create_hogql_database(team_id=self.team.pk))
for table, possible_columns in serialized_database.items():
if table == "numbers":
continue

columns = [
x["key"] for x in possible_columns if "table" not in x and "chain" not in x and "fields" not in x
]
execute_hogql_query(f"SELECT {','.join(columns)} FROM {table}", team=self.team)
execute_hogql_query("SELECT number FROM numbers(10) LIMIT 100", self.team)
else:
columns = [
x["key"]
for x in possible_columns
if "table" not in x and "chain" not in x and "fields" not in x
]
execute_hogql_query(f"SELECT {','.join(columns)} FROM {table}", team=self.team)

@patch("posthog.hogql.query.sync_execute", return_value=(None, None))
@pytest.mark.usefixtures("unittest_snapshot")
Expand Down

0 comments on commit 02cd0c4

Please sign in to comment.