-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(#2495): Fix tests failing after community role changes
- Loading branch information
1 parent
de7dd57
commit a97edea
Showing
4 changed files
with
48 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
from django.test import TestCase | ||
|
||
from communityroles.models import CommunityRole, CommunityRoleConfig | ||
from dashboard.forms import GetInvolvedForm, SignupForRecruitmentForm | ||
from recruitment.models import InstructorRecruitment | ||
from trainings.models import Involvement | ||
|
@@ -53,6 +54,17 @@ def test_clean_custom_validation__no_dates_event(self): | |
person = Person.objects.create( | ||
personal="Test", family="User", email="[email protected]" | ||
) | ||
config = CommunityRoleConfig.objects.create( | ||
name="instructor", | ||
display_name="Instructor", | ||
link_to_award=False, | ||
link_to_membership=False, | ||
additional_url=False, | ||
) | ||
CommunityRole.objects.create( | ||
config=config, | ||
person=person, | ||
) | ||
event = Event.objects.create(slug="test-event", host=host) # no dates | ||
recruitment = InstructorRecruitment.objects.create(status="o", event=event) | ||
data = {} | ||
|
@@ -69,6 +81,17 @@ def test_clean_custom_validation__no_conflicting_tasks(self): | |
person = Person.objects.create( | ||
personal="Test", family="User", email="[email protected]" | ||
) | ||
config = CommunityRoleConfig.objects.create( | ||
name="instructor", | ||
display_name="Instructor", | ||
link_to_award=False, | ||
link_to_membership=False, | ||
additional_url=False, | ||
) | ||
CommunityRole.objects.create( | ||
config=config, | ||
person=person, | ||
) | ||
event = Event.objects.create( | ||
slug="test-event", host=host, start=date(2022, 2, 19), end=date(2022, 2, 20) | ||
) | ||
|
@@ -87,6 +110,17 @@ def test_clean_custom_validation__conflicting_tasks(self): | |
person = Person.objects.create( | ||
personal="Test", family="User", email="[email protected]" | ||
) | ||
config = CommunityRoleConfig.objects.create( | ||
name="instructor", | ||
display_name="Instructor", | ||
link_to_award=False, | ||
link_to_membership=False, | ||
additional_url=False, | ||
) | ||
CommunityRole.objects.create( | ||
config=config, | ||
person=person, | ||
) | ||
event = Event.objects.create( | ||
slug="test-event", host=host, start=date(2022, 2, 19), end=date(2022, 2, 20) | ||
) | ||
|
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