Skip to content

Commit

Permalink
fix default website title value in test
Browse files Browse the repository at this point in the history
  • Loading branch information
inkhey committed Dec 10, 2019
1 parent cda0f0c commit 0488120
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions backend/tracim_backend/tests/functional/test_daemons.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_func__create_user_with_mail_notification__ok__nominal_case(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Global manager via Tracim <test_user_from+1@localhost>"
assert headers["To"][0] == "bob <bob@bob>"
assert headers["Subject"][0] == "[TRACIM] Created account"
assert headers["Subject"][0] == "[Tracim] Created account"

@pytest.mark.mail
def test_func__create_new_content_with_notification__ok__nominal_case(
Expand Down Expand Up @@ -71,7 +71,7 @@ def test_func__create_new_content_with_notification__ok__nominal_case(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == '"Bob i. via Tracim" <test_user_from+3@localhost>'
assert headers["To"][0] == "Global manager <admin@admin.admin>"
assert headers["Subject"][0] == "[TRACIM] [Recipes] file1 (Opened)"
assert headers["Subject"][0] == "[Tracim] [Recipes] file1 (Opened)"
assert headers["References"][0] == "test_user_refs+22@localhost"
assert (
headers["Reply-to"][0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_func__create_user_with_mail_notification__ok__nominal_case(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Global manager via Tracim <test_user_from+1@localhost>"
assert headers["To"][0] == "bob <bob@bob>"
assert headers["Subject"][0] == "[TRACIM] Created account"
assert headers["Subject"][0] == "[Tracim] Created account"

def test_func__create_new_content_with_notification__ok__nominal_case(
self,
Expand Down Expand Up @@ -134,7 +134,7 @@ def test_func__create_new_content_with_notification__ok__nominal_case(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == '"Bob i. via Tracim" <test_user_from+3@localhost>'
assert headers["To"][0] == "Global manager <admin@admin.admin>"
assert headers["Subject"][0] == "[TRACIM] [Recipes] file1 (Opened)"
assert headers["Subject"][0] == "[Tracim] [Recipes] file1 (Opened)"
assert headers["References"][0] == "test_user_refs+22@localhost"
assert (
headers["Reply-to"][0]
Expand Down Expand Up @@ -174,7 +174,7 @@ def test_func__create_comment_with_notification__ok__nominal_case(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == '"Bob i. via Tracim" <test_user_from+3@localhost>'
assert headers["To"][0] == "Global manager <admin@admin.admin>"
assert headers["Subject"][0] == "[TRACIM] [Recipes] file1 (Opened)"
assert headers["Subject"][0] == "[Tracim] [Recipes] file1 (Opened)"
assert headers["References"][0] == "test_user_refs+22@localhost"
assert (
headers["Reply-to"][0]
Expand All @@ -191,7 +191,7 @@ def test_func__reset_password__ok__nominal_case(self, user_api_factory, mailhog)
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Tracim Notifications <test_user_from+0@localhost>"
assert headers["To"][0] == "Global manager <admin@admin.admin>"
assert headers["Subject"][0] == "[TRACIM] A password reset has been requested"
assert headers["Subject"][0] == "[Tracim] A password reset has been requested"


@pytest.mark.usefixtures("base_fixture")
Expand Down Expand Up @@ -226,7 +226,7 @@ def test_func__create_user_with_mail_notification__ok__nominal_case(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Global manager via Tracim <test_user_from+1@localhost>"
assert headers["To"][0] == "bob <bob@bob>"
assert headers["Subject"][0] == "[TRACIM] Created account"
assert headers["Subject"][0] == "[Tracim] Created account"

def test_func__create_new_content_with_notification__ok__nominal_case(
self,
Expand Down Expand Up @@ -262,7 +262,7 @@ def test_func__create_new_content_with_notification__ok__nominal_case(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == '"Bob i. via Tracim" <test_user_from+3@localhost>'
assert headers["To"][0] == "Global manager <admin@admin.admin>"
assert headers["Subject"][0] == "[TRACIM] [Recipes] file1 (Opened)"
assert headers["Subject"][0] == "[Tracim] [Recipes] file1 (Opened)"
assert headers["References"][0] == "test_user_refs+22@localhost"
assert (
headers["Reply-to"][0]
Expand All @@ -284,4 +284,4 @@ def test_func__reset_password__ok__nominal_case(self, user_api_factory, mailhog,
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Tracim Notifications <test_user_from+0@localhost>"
assert headers["To"][0] == "Global manager <admin@admin.admin>"
assert headers["Subject"][0] == "[TRACIM] A password reset has been requested"
assert headers["Subject"][0] == "[Tracim] A password reset has been requested"
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_api__reset_password_request__ok__nominal_case(self, web_testapp, mailho
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Tracim Notifications <test_user_from+0@localhost>"
assert headers["To"][0] == "Global manager <admin@admin.admin>"
assert headers["Subject"][0] == "[TRACIM] A password reset has been requested"
assert headers["Subject"][0] == "[Tracim] A password reset has been requested"

@pytest.mark.email_notification
@pytest.mark.unknown_auth
Expand Down Expand Up @@ -50,7 +50,7 @@ def test_api__reset_password_request__ok__unknown_auth(self, web_testapp, mailho
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Tracim Notifications <test_user_from+0@localhost>"
assert headers["To"][0] == "test user <test@test.test>"
assert headers["Subject"][0] == "[TRACIM] A password reset has been requested"
assert headers["Subject"][0] == "[Tracim] A password reset has been requested"

@pytest.mark.email_notification
@pytest.mark.internal_auth
Expand Down
4 changes: 2 additions & 2 deletions backend/tracim_backend/tests/functional/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -3306,7 +3306,7 @@ def test_api__create_user__ok_200__full_admin_with_notif(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Global manager via Tracim <test_user_from+1@localhost>"
assert headers["To"][0] == "test user <test@test.test>"
assert headers["Subject"][0] == "[TRACIM] Created account"
assert headers["Subject"][0] == "[Tracim] Created account"

def test_api__create_user__ok_200__limited_admin_with_notif(
self, web_testapp, user_api_factory, mailhog
Expand Down Expand Up @@ -3337,7 +3337,7 @@ def test_api__create_user__ok_200__limited_admin_with_notif(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Global manager via Tracim <test_user_from+1@localhost>"
assert headers["To"][0] == "test <test@test.test>"
assert headers["Subject"][0] == "[TRACIM] Created account"
assert headers["Subject"][0] == "[Tracim] Created account"

def test_api_delete_user__ok_200__admin(
sel, web_testapp, user_api_factory, group_api_factory, mailhog
Expand Down
8 changes: 4 additions & 4 deletions backend/tracim_backend/tests/functional/test_workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -2099,7 +2099,7 @@ def test_api__create_workspace_member_role__ok_200__new_user(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "test via Tracim <test_user_from+5@localhost>"
assert headers["To"][0] == "bob <bob@bob.bob>"
assert headers["Subject"][0] == "[TRACIM] Created account"
assert headers["Subject"][0] == "[Tracim] Created account"


@pytest.mark.usefixtures("base_fixture")
Expand Down Expand Up @@ -2170,7 +2170,7 @@ def test_api__create_workspace_member_role__ok_200__new_user(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "test via Tracim <test_user_from+5@localhost>"
assert headers["To"][0] == "bob <bob@bob.bob>"
assert headers["Subject"][0] == "[TRACIM] Created account"
assert headers["Subject"][0] == "[Tracim] Created account"

def test_api__create_workspace_member_role__err_400__user_not_found_as_simple_user(
self,
Expand Down Expand Up @@ -2293,7 +2293,7 @@ def test_api__create_workspace_member_role__ok_200__new_user_notif(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "test via Tracim <test_user_from+5@localhost>"
assert headers["To"][0] == "bob <bob@bob.bob>"
assert headers["Subject"][0] == "[TRACIM] Created account"
assert headers["Subject"][0] == "[Tracim] Created account"
# check for notification to new user, user should not be notified
# until it connected to tracim.
mailhog.cleanup_mailhog()
Expand Down Expand Up @@ -2328,7 +2328,7 @@ def test_api__create_workspace_member_role__ok_200__new_user_notif(
headers = response[0]["Content"]["Headers"]
assert headers["From"][0] == "Global manager via Tracim <test_user_from+1@localhost>"
assert headers["To"][0] == "bob <bob@bob.bob>"
assert headers["Subject"][0] == "[TRACIM] [test] test_document2 (Opened)"
assert headers["Subject"][0] == "[Tracim] [test] test_document2 (Opened)"


@pytest.mark.usefixtures("base_fixture")
Expand Down

0 comments on commit 0488120

Please sign in to comment.