|
|
|
@ -102,7 +102,8 @@ def test_create_bill(api_client, student_client, manager_client, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.django_db |
|
|
|
@pytest.mark.django_db |
|
|
|
def test_confirm_pay_manager(manager_client, bill_cash, student): |
|
|
|
@mock.patch('django.core.mail.EmailMessage.send') |
|
|
|
|
|
|
|
def test_confirm_pay_manager(mocked_email, manager_client, bill_cash, student): |
|
|
|
assert Progress.objects.count() is 0 |
|
|
|
assert Progress.objects.count() is 0 |
|
|
|
assert ProgressLesson.objects.count() is 0 |
|
|
|
assert ProgressLesson.objects.count() is 0 |
|
|
|
data = { |
|
|
|
data = { |
|
|
|
@ -132,3 +133,4 @@ def test_confirm_pay_manager(manager_client, bill_cash, student): |
|
|
|
progress = Progress.objects.filter(user=bill_cash.user).first() |
|
|
|
progress = Progress.objects.filter(user=bill_cash.user).first() |
|
|
|
assert Progress.objects.filter(user=bill_cash.user).exists() is True |
|
|
|
assert Progress.objects.filter(user=bill_cash.user).exists() is True |
|
|
|
assert ProgressLesson.objects.filter(progress=progress).exists() is True |
|
|
|
assert ProgressLesson.objects.filter(progress=progress).exists() is True |
|
|
|
|
|
|
|
assert mocked_email.call_count == 1 |
|
|
|
|