Skip to content

Commit 8ea92c5

Browse files
renzonrenzon
authored andcommitted
Made SPP subscription asynchrounous
close #2673
1 parent 6fbd62d commit 8ea92c5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pythonpro/launch/tests/test_lead_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def email_upper(email):
1616

1717
@pytest.fixture
1818
def create_or_update_with_no_role(mocker):
19-
return mocker.patch('pythonpro.launch.views.email_marketing_facade.create_or_update_with_no_role')
19+
return mocker.patch('pythonpro.launch.views.email_marketing_facade.create_or_update_with_no_role.delay')
2020

2121

2222
@pytest.fixture

pythonpro/launch/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def lead_form(request):
3636
first_name = form.cleaned_data['name']
3737
user = request.user
3838
if user.is_authenticated:
39-
email_marketing_facade.create_or_update_with_no_role(
39+
email_marketing_facade.create_or_update_with_no_role.delay(
4040
first_name,
4141
email,
4242
f'turma-{find_most_recent_cohort().slug}-semana-do-programador', id=user.id)
4343
else:
44-
email_marketing_facade.create_or_update_with_no_role(
44+
email_marketing_facade.create_or_update_with_no_role.delay(
4545
first_name,
4646
email,
4747
f'turma-{find_most_recent_cohort().slug}-semana-do-programador')

0 commit comments

Comments
 (0)