-
-
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.
Merge pull request #2552 from carpentries/feature/remove-member-affil…
…iation Remove member affiliation question; remove code question from SO and WI forms
- Loading branch information
Showing
14 changed files
with
69 additions
and
242 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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 3.2.20 on 2023-10-23 13:45 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('extrequests', '0032_add_member_affiliation_and_member_code'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='selforganisedsubmission', | ||
name='member_affiliation', | ||
), | ||
migrations.RemoveField( | ||
model_name='workshopinquiryrequest', | ||
name='member_affiliation', | ||
), | ||
] |
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 |
---|---|---|
|
@@ -11,16 +11,7 @@ | |
from extrequests.models import SelfOrganisedSubmission | ||
import extrequests.views | ||
from workshops.forms import EventCreateForm | ||
from workshops.models import ( | ||
Curriculum, | ||
Event, | ||
Language, | ||
Membership, | ||
Organization, | ||
Role, | ||
Tag, | ||
Task, | ||
) | ||
from workshops.models import Curriculum, Event, Language, Organization, Role, Tag, Task | ||
from workshops.tests.base import FormTestHelper, TestBase | ||
|
||
|
||
|
@@ -353,12 +344,6 @@ def test_accept_with_event_autofill(self): | |
"""Ensure that fields are autofilled correctly when creating an Event from a | ||
SelfOrganisedSubmission.""" | ||
# Arrange | ||
expected_membership = Membership.objects.create( | ||
name="Hogwarts", | ||
agreement_start=date.today() - timedelta(weeks=26), | ||
agreement_end=date.today() + timedelta(weeks=26), | ||
registration_code="hogwarts55", | ||
) | ||
sos = SelfOrganisedSubmission.objects.create( | ||
# required fields | ||
state="p", | ||
|
@@ -374,8 +359,6 @@ def test_accept_with_event_autofill(self): | |
online_inperson="online", | ||
workshop_listed=False, | ||
additional_contact="[email protected]", | ||
member_affiliation="yes", | ||
member_code="hogwarts55", | ||
) | ||
curriculum = Curriculum.objects.filter(name__contains="Data Carpentry").first() | ||
sos.workshop_types.set([curriculum]) | ||
|
@@ -399,7 +382,6 @@ def test_accept_with_event_autofill(self): | |
self.assertEqual(form_initial["host"].pk, sos.institution.pk) | ||
self.assertEqual(form_initial["start"], sos.start) | ||
self.assertEqual(form_initial["end"], sos.end) | ||
self.assertEqual(form_initial["membership"].pk, expected_membership.pk) | ||
|
||
def test_discarded_request_not_accepted_with_event(self): | ||
rv = self.client.get( | ||
|
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 |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
Event, | ||
KnowledgeDomain, | ||
Language, | ||
Membership, | ||
Organization, | ||
Role, | ||
Tag, | ||
|
@@ -511,12 +510,6 @@ def test_accept_with_event_autofill(self): | |
"""Ensure that fields are autofilled correctly when creating an Event from a | ||
WorkshopInquiryRequest.""" | ||
# Arrange | ||
expected_membership = Membership.objects.create( | ||
name="Hogwarts", | ||
agreement_start=date.today() - timedelta(weeks=26), | ||
agreement_end=date.today() + timedelta(weeks=26), | ||
registration_code="hogwarts55", | ||
) | ||
wi = WorkshopInquiryRequest.objects.create( | ||
# required fields | ||
state="p", | ||
|
@@ -535,8 +528,6 @@ def test_accept_with_event_autofill(self): | |
online_inperson="online", | ||
workshop_listed=False, | ||
additional_contact="[email protected]", | ||
member_affiliation="yes", | ||
member_code="hogwarts55", | ||
) | ||
curriculum = Curriculum.objects.filter(name__contains="Data Carpentry").first() | ||
wi.requested_workshop_types.set([curriculum]) | ||
|
@@ -558,7 +549,6 @@ def test_accept_with_event_autofill(self): | |
self.assertEqual(form_initial["host"].pk, wi.institution.pk) | ||
self.assertEqual(form_initial["start"], wi.preferred_dates) | ||
self.assertEqual(form_initial["end"], wi.preferred_dates + timedelta(days=1)) | ||
self.assertEqual(form_initial["membership"].pk, expected_membership.pk) | ||
|
||
def test_discarded_request_not_accepted_with_event(self): | ||
rv = self.client.get( | ||
|
Oops, something went wrong.