-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
52 additions
and
48 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 |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
continue-on-error: true | ||
run: | | ||
git config user.name 'GitHub Actions' | ||
git config user.email [email protected] | ||
git config user.email [email protected] # /PS-IGNORE | ||
git add . | ||
git commit -m "Automated update of requirements.txt" | ||
git push | ||
|
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
.env.ci | ||
.env.example | ||
.pre-commit-config.yaml | ||
Procfile | ||
README.md | ||
config/stop-words.txt | ||
config/synonyms.txt | ||
core/templates/404.html | ||
core/test/test_views.py | ||
docs/features/search.excalidraw | ||
import_wordpress/test/wordpress_test.xml | ||
Makefile | ||
package-lock.json | ||
peoplefinder/test/conftest.py | ||
peoplefinder/test/services/test_audit_log.py | ||
poetry.lock | ||
Procfile | ||
README.md | ||
requirements.txt | ||
requirements/base.txt | ||
requirements/dev.txt | ||
requirements/prod.txt | ||
runtime.txt | ||
setup/init.sql | ||
user/management/commands/create_test_users.py | ||
user/migrations/0001_initial.py | ||
user/migrations/0002_auto_20210216_0650.py | ||
user/migrations/0004_historicaluser.py | ||
user/test/factories.py | ||
user/test/test_user.py | ||
src/config/stop-words.txt | ||
src/config/synonyms.txt | ||
src/core/templates/404.html | ||
src/core/test/test_views.py | ||
src/peoplefinder/test/conftest.py | ||
src/peoplefinder/test/services/test_audit_log.py | ||
src/user/management/commands/create_test_users.py | ||
src/user/migrations/0001_initial.py | ||
src/user/migrations/0002_auto_20210216_0650.py | ||
src/user/migrations/0004_historicaluser.py | ||
src/user/test/factories.py | ||
src/user/test/test_user.py |
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,7 +2,7 @@ | |
name = "digital-workspace-v2" | ||
version = "1.0.0" | ||
description = "" | ||
authors = ["Live Services <[email protected]>"] | ||
authors = ["Live Services <[email protected]>"] # /PS-IGNORE | ||
license = "MIT" | ||
readme = "README.md" | ||
|
||
|
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 |
---|---|---|
|
@@ -64,7 +64,7 @@ for person in Person.objects.all().reverse(): | |
f"{person.first_name.lower()}.{person.last_name.lower()}@{email_parts[1]}" | ||
) | ||
person.user.username = ( | ||
f"{person.first_name.lower()}.{person.last_name.lower()}[email protected]" | ||
f"{person.first_name.lower()}.{person.last_name.lower()}[email protected]" # /PS-IGNORE | ||
) | ||
person.user.email = person.email | ||
if person.user.sso_contact_email is not None: | ||
|
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 |
---|---|---|
|
@@ -118,7 +118,7 @@ def recreate_db_between_tests(django_db_blocker): | |
|
||
@pytest.fixture | ||
def superuser(django_db_blocker, django_user_model, page): | ||
email = "[email protected]" | ||
email = "[email protected]" # /PS-IGNORE | ||
|
||
user, _ = django_user_model.objects.get_or_create( | ||
username="testsuperuser", | ||
|
@@ -142,10 +142,10 @@ def superuser(django_db_blocker, django_user_model, page): | |
@pytest.fixture | ||
def user(django_db_blocker, django_user_model): | ||
user, _ = django_user_model.objects.get_or_create( | ||
username="[email protected]", | ||
username="[email protected]", # /PS-IGNORE | ||
first_name="John", | ||
last_name="Smith", | ||
email="[email protected]", | ||
email="[email protected]", # /PS-IGNORE | ||
legacy_sso_user_id="1234abcd-1234-abcd-1234-abcd1234abcd", | ||
) | ||
user.set_password("password") | ||
|
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import pytest | ||
from unittest.mock import call | ||
|
||
import pytest | ||
from django.test import override_settings | ||
from django_feedback_govuk.models import BaseFeedback | ||
|
||
|
@@ -56,7 +57,7 @@ def test_send_feedback_notification_with_no_email_recipients(): | |
|
||
@override_settings( | ||
GOVUK_NOTIFY_API_KEY="this-is-my-really-long-api-key-because-gov-uk-notify-expects-it-to-be-long-when-you-create-a-service", | ||
FEEDBACK_NOTIFICATION_EMAIL_RECIPIENTS=["[email protected]"], | ||
FEEDBACK_NOTIFICATION_EMAIL_RECIPIENTS=["[email protected]"], # /PS-IGNORE | ||
FEEDBACK_NOTIFICATION_EMAIL_TEMPLATE_ID="test-template-id", | ||
WAGTAILADMIN_BASE_URL="https://test.example.com/", | ||
) | ||
|
@@ -67,7 +68,7 @@ def test_send_feedback_notification_with_valid_settings(mocker): | |
) | ||
send_feedback_notification() | ||
mock_send_email_notification.assert_called_once_with( | ||
email_address="[email protected]", | ||
email_address="[email protected]", # /PS-IGNORE | ||
template_id="test-template-id", | ||
personalisation={ | ||
"feedback_url": "https://test.example.com/feedback/submitted/" | ||
|
@@ -77,7 +78,10 @@ def test_send_feedback_notification_with_valid_settings(mocker): | |
|
||
@override_settings( | ||
GOVUK_NOTIFY_API_KEY="this-is-my-really-long-api-key-because-gov-uk-notify-expects-it-to-be-long-when-you-create-a-service", | ||
FEEDBACK_NOTIFICATION_EMAIL_RECIPIENTS=["[email protected]", "[email protected]"], | ||
FEEDBACK_NOTIFICATION_EMAIL_RECIPIENTS=[ | ||
"[email protected]", # /PS-IGNORE | ||
"[email protected]", # /PS-IGNORE | ||
], | ||
FEEDBACK_NOTIFICATION_EMAIL_TEMPLATE_ID="test-template-id", | ||
WAGTAILADMIN_BASE_URL="https://test.example.com/", | ||
) | ||
|
@@ -88,14 +92,14 @@ def test_send_feedback_notification_with_multiple_emails(mocker): | |
) | ||
expected_calls = [ | ||
call( | ||
email_address="[email protected]", | ||
email_address="[email protected]", # /PS-IGNORE | ||
template_id="test-template-id", | ||
personalisation={ | ||
"feedback_url": "https://test.example.com/feedback/submitted/" | ||
}, | ||
), | ||
call( | ||
email_address="[email protected]", | ||
email_address="[email protected]", # /PS-IGNORE | ||
template_id="test-template-id", | ||
personalisation={ | ||
"feedback_url": "https://test.example.com/feedback/submitted/" | ||
|
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
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 |
---|---|---|
|
@@ -96,7 +96,7 @@ def test_already_has_profile(self, normal_user): | |
{ | ||
"user": None, | ||
"legacy_sso_user_id": "not-a-match", | ||
"email": "[email protected]", | ||
"email": "[email protected]", # /PS-IGNORE | ||
}, | ||
), | ||
) | ||
|
@@ -120,7 +120,7 @@ def test_no_match(self, normal_user): | |
|
||
profile.user = None | ||
profile.legacy_sso_user_id = "not-a-match" | ||
profile.email = "[email protected]" | ||
profile.email = "[email protected]" # /PS-IGNORE | ||
profile.first_name = "no" | ||
profile.last_name = "match" | ||
profile.save() | ||
|
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 |
---|---|---|
|
@@ -179,10 +179,10 @@ def test_delete_profile_with_no_user(state): | |
other_user = UserFactory( | ||
first_name="Other", | ||
last_name="User", | ||
email="[email protected]", | ||
email="[email protected]", # /PS-IGNORE | ||
legacy_sso_user_id=None, | ||
username="[email protected]", | ||
sso_contact_email="[email protected]", | ||
username="[email protected]", # /PS-IGNORE | ||
sso_contact_email="[email protected]", # /PS-IGNORE | ||
) | ||
other_user.save() | ||
other_person = PersonService().create_user_profile(other_user) | ||
|
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 |
---|---|---|
|
@@ -424,13 +424,13 @@ def test_profile_edit_contact_view(state): | |
response = state.client.get(view_url) | ||
|
||
assert response.status_code == 200 | ||
assert state.person.contact_email == "[email protected]" | ||
assert state.person.contact_email == "[email protected]" # /PS-IGNORE | ||
assert state.person.primary_phone_number is None | ||
assert state.person.secondary_phone_number is None | ||
|
||
form = ContactProfileEditForm( | ||
{ | ||
"contact_email": "[email protected]", | ||
"contact_email": "[email protected]", # /PS-IGNORE | ||
"primary_phone_number": "01234567890", | ||
"secondary_phone_number": "09876543210", | ||
}, | ||
|
@@ -445,7 +445,7 @@ def test_profile_edit_contact_view(state): | |
|
||
assert response.status_code == 302 | ||
assert response.url == view_url | ||
assert state.person.contact_email == "[email protected]" | ||
assert state.person.contact_email == "[email protected]" # /PS-IGNORE | ||
assert state.person.primary_phone_number == "01234567890" | ||
assert state.person.secondary_phone_number == "09876543210" | ||
|
||
|
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 |
---|---|---|
|
@@ -39,7 +39,7 @@ def test_updated_profile(self, another_normal_user): | |
|
||
another_normal_user.profile.first_name = "Tim" | ||
another_normal_user.profile.preferred_first_name = "Tim" | ||
another_normal_user.profile.email = "[email protected]" | ||
another_normal_user.profile.email = "[email protected]" # /PS-IGNORE | ||
another_normal_user.profile.save() | ||
|
||
call_command("update_index") | ||
|
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 |
---|---|---|
|
@@ -21,18 +21,18 @@ def test_order_team_leaders(self, team_admin_user, software_team): | |
red_leader = UserFactory( | ||
first_name="Red", | ||
last_name="Leader", | ||
email="[email protected]", | ||
email="[email protected]", # /PS-IGNORE | ||
legacy_sso_user_id=None, | ||
username="red-leader", | ||
sso_contact_email="[email protected]", | ||
sso_contact_email="[email protected]", # /PS-IGNORE | ||
) | ||
gold_leader = UserFactory( | ||
first_name="Gold", | ||
last_name="Leader", | ||
email="[email protected]", | ||
email="[email protected]", # /PS-IGNORE | ||
legacy_sso_user_id=None, | ||
username="gold-leader", | ||
sso_contact_email="[email protected]", | ||
sso_contact_email="[email protected]", # /PS-IGNORE | ||
) | ||
|
||
call_command("create_user_profiles") | ||
|