Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
EDsCODE committed Oct 17, 2024
1 parent b2d9e80 commit 4422580
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions posthog/temporal/tests/external_data/test_external_data_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
ExternalDataJob,
ExternalDataSource,
ExternalDataSchema,
get_external_data_job,
)

from posthog.temporal.data_imports.pipelines.schemas import (
Expand Down Expand Up @@ -379,9 +380,7 @@ async def setup_job_1():
schema=customer_schema,
)

new_job = await sync_to_async(
ExternalDataJob.objects.filter(id=new_job.id).prefetch_related("pipeline").prefetch_related("schema").get
)()
new_job = await get_external_data_job(new_job.id)

inputs = ImportDataActivityInputs(
team_id=team.id,
Expand All @@ -403,16 +402,17 @@ async def setup_job_2():
job_inputs={"stripe_secret_key": "test-key", "stripe_account_id": "acct_id"},
)

charge_schema = await _create_schema("Charge", new_source, team)

new_job: ExternalDataJob = await sync_to_async(ExternalDataJob.objects.create)(
team_id=team.id,
pipeline_id=new_source.pk,
status=ExternalDataJob.Status.RUNNING,
rows_synced=0,
schema=charge_schema,
)

new_job = await sync_to_async(ExternalDataJob.objects.filter(id=new_job.id).prefetch_related("pipeline").get)()

charge_schema = await _create_schema("Charge", new_source, team)
new_job = await get_external_data_job(new_job.id)

inputs = ImportDataActivityInputs(
team_id=team.id,
Expand Down

0 comments on commit 4422580

Please sign in to comment.