-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
709b074
commit 083698b
Showing
9 changed files
with
30 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from posthog.api.test.test_organization import create_organization as create_organization_base | ||
from posthog.constants import AvailableFeature | ||
from posthog.models import Organization | ||
|
||
|
||
def create_organization(name: str, has_data_pipelines_feature: bool = True) -> Organization: | ||
organization = create_organization_base(name) | ||
if has_data_pipelines_feature: | ||
organization.available_product_features = [ | ||
{"key": AvailableFeature.DATA_PIPELINES, "name": AvailableFeature.DATA_PIPELINES} | ||
] | ||
organization.save() | ||
return organization |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
create_batch_export_ok, | ||
get_batch_export, | ||
) | ||
from posthog.api.test.test_organization import create_organization | ||
from posthog.api.test.batch_exports.fixtures import create_organization | ||
from posthog.api.test.test_team import create_team | ||
from posthog.api.test.test_user import create_user | ||
from posthog.temporal.common.client import sync_connect | ||
|
@@ -82,11 +82,11 @@ def test_cannot_get_exports_for_other_organizations(client: HttpClient): | |
"interval": "hour", | ||
} | ||
|
||
organization = create_organization("Test Org") | ||
organization = create_organization_with_dat("Test Org") | ||
team = create_team(organization) | ||
user = create_user("[email protected]", "Test User", organization) | ||
|
||
another_organization = create_organization("Another Org") | ||
another_organization = create_organization_with_dat("Another Org") | ||
another_user = create_user("[email protected]", "Another Test User", another_organization) | ||
|
||
with start_test_worker(temporal): | ||
|
@@ -126,7 +126,7 @@ def test_batch_exports_are_partitioned_by_team(client: HttpClient): | |
"interval": "hour", | ||
} | ||
|
||
organization = create_organization("Test Org") | ||
organization = create_organization_with_dat("Test Org") | ||
team = create_team(organization) | ||
another_team = create_team(organization) | ||
user = create_user("[email protected]", "Test User", organization) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters