Commit dae96feb authored by Enrico Zini's avatar Enrico Zini
Browse files

Removed the last of textfixtures uses. refs: #5

parent f57c7054
......@@ -15,7 +15,6 @@
gnupg
debian-keyring
python3-git
python3-testfixtures
libjs-bootstrap4
fonts-fork-awesome
libjs-jquery-datatables
......
......@@ -7,7 +7,6 @@ import backend.const as const
from process.models import Process
from sitechecks.models import Inconsistency
from unittest import mock
from testfixtures import LogCapture
class MockHousekeeper:
......@@ -124,15 +123,15 @@ class TestCheckLDAPConsistency(ProcessFixtureMixin, TestCase):
MockEntry("dd_u", supplementaryGid=["Debian"], cn="tcn",
mn="tmn", sn="tsn", emailForward="test@example.org", accountStatus=None)
]
with LogCapture() as lc:
with self.assertLogs() as log:
self.hk.run(CheckLDAPConsistency)
lc.check(
("dsa.housekeeping", "INFO", "None: dd_u changing email_ldap from dd_u@example.org to test@example.org"
" (source: LDAP)"),
('dsa.housekeeping', 'INFO', 'None: dd_u changing cn from Dd_u to tcn (source: LDAP)'),
('dsa.housekeeping', 'INFO', 'None: dd_u changing mn from to tmn (source: LDAP)'),
('dsa.housekeeping', 'INFO', 'None: dd_u changing sn from to tsn (source: LDAP)'),
)
self.assertEqual(log.output, [
"INFO:dsa.housekeeping:test.CheckLDAPConsistency: dd_u changing email_ldap from dd_u@example.org"
" to test@example.org (source: LDAP)",
'INFO:dsa.housekeeping:test.CheckLDAPConsistency: dd_u changing cn from Dd_u to tcn (source: LDAP)',
'INFO:dsa.housekeeping:test.CheckLDAPConsistency: dd_u changing mn from to tmn (source: LDAP)',
'INFO:dsa.housekeeping:test.CheckLDAPConsistency: dd_u changing sn from to tsn (source: LDAP)',
])
p = self.persons.dd_u
p.refresh_from_db()
......
......@@ -48,7 +48,6 @@
- gnupg
- debian-keyring
- python3-git
- python3-testfixtures
- libjs-bootstrap4
- fonts-fork-awesome
- libjs-jquery-datatables
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment