-
Notifications
You must be signed in to change notification settings - Fork 26
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 #3973 from open-formulieren/deprecated-asserts
🗑️ Update deprecated unittest methods
- Loading branch information
Showing
10 changed files
with
22 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -678,7 +678,7 @@ def test_send_confirmation_mail_text_kitchensink(self, appointment_plugin_mock): | |
# process to keep tests sane (random tokens) | ||
text = message.body.rstrip() | ||
text = re.sub(url_exp, "#URL#", text) | ||
self.assertEquals(expected_text, text) | ||
self.assertEqual(expected_text, text) | ||
self.assertNotIn("<a ", text) | ||
self.assertNotIn("<td ", text) | ||
self.assertNotIn("<p ", text) | ||
|
@@ -798,7 +798,7 @@ def test_templatetag_alias(self): | |
""" | ||
).lstrip() | ||
|
||
self.assertEquals(expected_text, text) | ||
self.assertEqual(expected_text, text) | ||
|
||
def test_confirmation_email_cosign_required(self): | ||
submission = SubmissionFactory.from_components( | ||
|
@@ -836,7 +836,7 @@ def test_confirmation_email_cosign_required(self): | |
"This form will not be processed until it has been co-signed. A co-sign " | ||
"request was sent to %(cosigner_email)s." | ||
) % {"cosigner_email": "[email protected]"} | ||
self.assertEquals(expected_text, text) | ||
self.assertEqual(expected_text, text) | ||
|
||
def test_confirmation_email_cosign_not_required_but_filled_in(self): | ||
submission = SubmissionFactory.from_components( | ||
|
@@ -874,7 +874,7 @@ def test_confirmation_email_cosign_not_required_but_filled_in(self): | |
"This form will not be processed until it has been co-signed. A co-sign " | ||
"request was sent to %(cosigner_email)s." | ||
) % {"cosigner_email": "[email protected]"} | ||
self.assertEquals(expected_text, text) | ||
self.assertEqual(expected_text, text) | ||
|
||
def test_confirmation_email_cosign_complete(self): | ||
submission = SubmissionFactory.from_components( | ||
|
@@ -912,7 +912,7 @@ def test_confirmation_email_cosign_complete(self): | |
"This email is a confirmation that this form has been co-signed by " | ||
"%(cosigner_email)s and can now be processed." | ||
) % {"cosigner_email": "[email protected]"} | ||
self.assertEquals(expected_text, text) | ||
self.assertEqual(expected_text, text) | ||
|
||
def test_confirmation_email_cosign_not_required_and_not_filled_in(self): | ||
submission = SubmissionFactory.from_components( | ||
|
@@ -949,7 +949,7 @@ def test_confirmation_email_cosign_not_required_and_not_filled_in(self): | |
|
||
message = mail.outbox[0] | ||
text = message.body.rstrip() | ||
self.assertEquals(text, "Test:") | ||
self.assertEqual(text, "Test:") | ||
|
||
def test_confirmation_email_cosign_completed(self): | ||
submission = SubmissionFactory.from_components( | ||
|
@@ -986,4 +986,4 @@ def test_confirmation_email_cosign_completed(self): | |
text = message.body.rstrip() | ||
expected_text = inspect.cleandoc("Test:").lstrip() | ||
|
||
self.assertEquals(expected_text, text) | ||
self.assertEqual(expected_text, text) |
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 |
---|---|---|
|
@@ -45,13 +45,13 @@ def test_send_mail_html(self): | |
self.assertEqual(message.from_email, "[email protected]") | ||
|
||
# text | ||
self.assertEquals(message.body, "My Message\n") | ||
self.assertEqual(message.body, "My Message\n") | ||
self.assertNotIn("<p>", message.body) | ||
|
||
# html alternative | ||
self.assertEqual(len(message.alternatives), 1) | ||
content, mime_type = message.alternatives[0] | ||
self.assertEquals(mime_type, "text/html") | ||
self.assertEqual(mime_type, "text/html") | ||
self.assertIn("<p>My Message</p>", content) | ||
self.assertIn("<table", content) | ||
|
||
|
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