|
13 | 13 | from shared.django_apps.reports.tests.factories import ( |
14 | 14 | UploadFactory as DjangoUploadFactory, |
15 | 15 | ) |
16 | | -from shared.plan.constants import PlanName |
| 16 | +from shared.plan.constants import DEFAULT_FREE_PLAN |
17 | 17 | from shared.plan.service import PlanService |
18 | 18 | from shared.upload.utils import UploaderType, insert_coverage_measurement |
19 | 19 | from shared.utils.test_utils import mock_config_helper |
@@ -229,7 +229,7 @@ def test_decoration_type_basic_plan_upload_limit( |
229 | 229 | dbsession.add(pr_author) |
230 | 230 | dbsession.flush() |
231 | 231 |
|
232 | | - enriched_pull.database_pull.repository.owner.plan = "users-basic" |
| 232 | + enriched_pull.database_pull.repository.owner.plan = DEFAULT_FREE_PLAN |
233 | 233 | enriched_pull.database_pull.repository.private = True |
234 | 234 |
|
235 | 235 | commit = CommitFactory.create( |
@@ -356,7 +356,7 @@ def test_decoration_type_unlimited_upload_on_enterprise( |
356 | 356 | dbsession.add(pr_author) |
357 | 357 | dbsession.flush() |
358 | 358 |
|
359 | | - enriched_pull.database_pull.repository.owner.plan = "users-basic" |
| 359 | + enriched_pull.database_pull.repository.owner.plan = DEFAULT_FREE_PLAN |
360 | 360 | enriched_pull.database_pull.repository.private = True |
361 | 361 |
|
362 | 362 | commit = CommitFactory.create( |
@@ -392,7 +392,7 @@ def test_uploads_used_with_expired_trial(self, mocker): |
392 | 392 | trial_status=TrialStatus.EXPIRED.value, |
393 | 393 | trial_start_date=datetime.now() + timedelta(days=-10), |
394 | 394 | trial_end_date=datetime.now() + timedelta(days=-2), |
395 | | - plan=PlanName.BASIC_PLAN_NAME.value, |
| 395 | + plan=DEFAULT_FREE_PLAN, |
396 | 396 | ) |
397 | 397 | repository = DjangoRepositoryFactory( |
398 | 398 | author=owner, |
@@ -507,7 +507,7 @@ def test_get_decoration_type_for_users_plan(self, dbsession): |
507 | 507 | owner__username="drazisil-org", |
508 | 508 | owner__service="github", |
509 | 509 | owner__unencrypted_oauth_token="testtfasdfasdflxuu2kfer2ef23", |
510 | | - owner__plan=PlanName.BASIC_PLAN_NAME.value, |
| 510 | + owner__plan=DEFAULT_FREE_PLAN, |
511 | 511 | private=True, |
512 | 512 | ) |
513 | 513 | dbsession.add(repository) |
@@ -706,11 +706,11 @@ def test_get_decoration_type_should_attempt_pr_author_auto_activation( |
706 | 706 | ) |
707 | 707 |
|
708 | 708 | @pytest.mark.django_db |
709 | | - def test_get_decoration_type_should_attempt_pr_author_auto_activation_users_free( |
| 709 | + def test_get_decoration_type_should_attempt_pr_author_auto_activation_users_developer( |
710 | 710 | self, dbsession, mocker, enriched_pull |
711 | 711 | ): |
712 | | - enriched_pull.database_pull.repository.owner.plan = "users-free" |
713 | | - enriched_pull.database_pull.repository.owner.plan_user_count = 5 |
| 712 | + enriched_pull.database_pull.repository.owner.plan = DEFAULT_FREE_PLAN |
| 713 | + enriched_pull.database_pull.repository.owner.plan_user_count = 1 |
714 | 714 | enriched_pull.database_pull.repository.owner.plan_activated_users = [] |
715 | 715 | enriched_pull.database_pull.repository.owner.plan_auto_activate = True |
716 | 716 |
|
@@ -961,7 +961,7 @@ def test_uploads_used_with_expired_trial(self, mocker, dbsession): |
961 | 961 | trial_status=TrialStatus.EXPIRED.value, |
962 | 962 | trial_start_date=datetime.now() + timedelta(days=-10), |
963 | 963 | trial_end_date=datetime.now() + timedelta(days=-2), |
964 | | - plan=PlanName.BASIC_PLAN_NAME.value, |
| 964 | + plan=DEFAULT_FREE_PLAN, |
965 | 965 | ) |
966 | 966 | repository = DjangoRepositoryFactory( |
967 | 967 | author=owner, |
|
0 commit comments