Skip to content

Commit

Permalink
Merge pull request #2606 from carpentries/chore/Turn-on-member-codes-…
Browse files Browse the repository at this point in the history
…feature-on-test-amy

[Chore] Unconditionally enable "ENFORCE_MEMBER_CODES" feature flag
  • Loading branch information
pbanaszkiewicz authored Jan 24, 2024
2 parents 0c462a2 + 5446045 commit 1e64067
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions amy/extforms/tests/test_training_request_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def add_terms_to_payload(self) -> dict[str, int]:
data[term.slug] = option.pk
return data

@override_settings(FLAGS={"ENFORCE_MEMBER_CODES": [("boolean", False)]})
def test_request_added(self):
# Arrange
email = self.data.get("email")
Expand Down Expand Up @@ -178,6 +179,7 @@ def test_review_process_validation__preapproved_code_empty(self):
HiddenInput,
)

@override_settings(FLAGS={"ENFORCE_MEMBER_CODES": [("boolean", False)]})
def test_review_process_validation__open_code_nonempty(self):
"""Shouldn't pass when review_process requires *NO* member_code."""
# Arrange
Expand Down
5 changes: 2 additions & 3 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,8 @@
{"condition": "parameter", "value": "enable_email_module=true"},
{"condition": "session", "value": "enable_email_module"},
],
# Always enabled.
"ENFORCE_MEMBER_CODES": [
{"condition": "anonymous", "value": False, "required": True},
{"condition": "parameter", "value": "enforce_member_codes=true"},
{"condition": "session", "value": "enforce_member_codes"},
{"condition": "boolean", "value": True},
],
}

0 comments on commit 1e64067

Please sign in to comment.