This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8494 in repository https://gitbox.apache.org/repos/asf/allura.git
commit 3cf91ae5a29a5163e6a5d1dad64c2b19acfa8778 Author: Guillermo Cruz <[email protected]> AuthorDate: Mon Jan 23 00:51:25 2023 +0000 [#8494] test fixes --- Allura/allura/tasks/mail_tasks.py | 2 +- Allura/allura/tests/unit/test_ldap_auth_provider.py | 8 ++++---- ForgeSVN/forgesvn/tests/model/test_repository.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Allura/allura/tasks/mail_tasks.py b/Allura/allura/tasks/mail_tasks.py index 16cf82dae..e2b2a0a15 100644 --- a/Allura/allura/tasks/mail_tasks.py +++ b/Allura/allura/tasks/mail_tasks.py @@ -117,7 +117,7 @@ def create_multipart_msg(text, metalink=None): def replace_html(matchobj): text_within_div = matchobj.group(1) text_within_div = text_within_div.replace('</p>', '\n') - text_within_div = markupsafe._striptags_re.sub('', text_within_div) + text_within_div = markupsafe._strip_tags_re.sub('', text_within_div) return text_within_div plain_text = text diff --git a/Allura/allura/tests/unit/test_ldap_auth_provider.py b/Allura/allura/tests/unit/test_ldap_auth_provider.py index 1b0967dfc..8a43f1763 100644 --- a/Allura/allura/tests/unit/test_ldap_auth_provider.py +++ b/Allura/allura/tests/unit/test_ldap_auth_provider.py @@ -61,7 +61,7 @@ class TestLdapAuthenticationProvider: self.provider.set_password(user, 'old-pass', 'new-pass') ldap.initialize.assert_called_once_with('ldaps://localhost/') connection = ldap.initialize.return_value - connection.bind_s.called_once_with(dn, b'old-pass') + connection.simple_bind_s.assert_called_once_with(dn, b'old-pass') connection.modify_s.assert_called_once_with( dn, [(ldap.MOD_REPLACE, 'userPassword', b'new-pass-hash')]) assert connection.unbind_s.call_count == 1 @@ -81,7 +81,7 @@ class TestLdapAuthenticationProvider: dn = 'uid=%s,ou=people,dc=localdomain' % params['username'] ldap.initialize.assert_called_once_with('ldaps://localhost/') connection = ldap.initialize.return_value - connection.bind_s.called_once_with(dn, 'test-password') + connection.simple_bind_s.assert_called_once_with(dn, b'test-password') assert connection.unbind_s.call_count == 1 @patch('allura.lib.plugin.ldap') @@ -124,9 +124,9 @@ class TestLdapAuthenticationProvider: dn = 'uid=%s,ou=people,dc=localdomain' % user_doc['username'] ldap.initialize.assert_called_once_with('ldaps://localhost/') connection = ldap.initialize.return_value - connection.bind_s.called_once_with( + connection.simple_bind_s.assert_called_once_with( 'cn=admin,dc=localdomain', - 'admin-password') + 'secret') connection.add_s.assert_called_once_with(dn, modlist.addModlist.return_value) assert connection.unbind_s.call_count == 1 diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py index 4716bff9f..d0fd0712a 100644 --- a/ForgeSVN/forgesvn/tests/model/test_repository.py +++ b/ForgeSVN/forgesvn/tests/model/test_repository.py @@ -753,7 +753,7 @@ class TestRepo(_TestWithRepo): self.repo.init_as_clone('srcpath', 'srcname', 'srcurl') assert self.repo.upstream_repo.name == 'srcname' assert self.repo.upstream_repo.url == 'srcurl' - assert self.repo._impl.clone_from.called_with('srcpath') + self.repo._impl.clone_from.assert_called_with('srcpath') post_event.assert_called_once_with('repo_cloned', 'srcurl', 'srcpath') def test_latest(self):
