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 @@ ...@@ -15,7 +15,6 @@
gnupg gnupg
debian-keyring debian-keyring
python3-git python3-git
python3-testfixtures
libjs-bootstrap4 libjs-bootstrap4
fonts-fork-awesome fonts-fork-awesome
libjs-jquery-datatables libjs-jquery-datatables
......
...@@ -7,7 +7,6 @@ import backend.const as const ...@@ -7,7 +7,6 @@ import backend.const as const
from process.models import Process from process.models import Process
from sitechecks.models import Inconsistency from sitechecks.models import Inconsistency
from unittest import mock from unittest import mock
from testfixtures import LogCapture
class MockHousekeeper: class MockHousekeeper:
...@@ -124,15 +123,15 @@ class TestCheckLDAPConsistency(ProcessFixtureMixin, TestCase): ...@@ -124,15 +123,15 @@ class TestCheckLDAPConsistency(ProcessFixtureMixin, TestCase):
MockEntry("dd_u", supplementaryGid=["Debian"], cn="tcn", MockEntry("dd_u", supplementaryGid=["Debian"], cn="tcn",
mn="tmn", sn="tsn", emailForward="test@example.org", accountStatus=None) mn="tmn", sn="tsn", emailForward="test@example.org", accountStatus=None)
] ]
with LogCapture() as lc: with self.assertLogs() as log:
self.hk.run(CheckLDAPConsistency) self.hk.run(CheckLDAPConsistency)
lc.check( self.assertEqual(log.output, [
("dsa.housekeeping", "INFO", "None: dd_u changing email_ldap from dd_u@example.org to test@example.org" "INFO:dsa.housekeeping:test.CheckLDAPConsistency: dd_u changing email_ldap from dd_u@example.org"
" (source: LDAP)"), " to test@example.org (source: LDAP)",
('dsa.housekeeping', 'INFO', 'None: dd_u changing cn from Dd_u to tcn (source: LDAP)'), 'INFO:dsa.housekeeping:test.CheckLDAPConsistency: dd_u changing cn from Dd_u to tcn (source: LDAP)',
('dsa.housekeeping', 'INFO', 'None: dd_u changing mn from to tmn (source: LDAP)'), 'INFO:dsa.housekeeping:test.CheckLDAPConsistency: dd_u changing mn from to tmn (source: LDAP)',
('dsa.housekeeping', 'INFO', 'None: dd_u changing sn from to tsn (source: LDAP)'), 'INFO:dsa.housekeeping:test.CheckLDAPConsistency: dd_u changing sn from to tsn (source: LDAP)',
) ])
p = self.persons.dd_u p = self.persons.dd_u
p.refresh_from_db() p.refresh_from_db()
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
- gnupg - gnupg
- debian-keyring - debian-keyring
- python3-git - python3-git
- python3-testfixtures
- libjs-bootstrap4 - libjs-bootstrap4
- fonts-fork-awesome - fonts-fork-awesome
- libjs-jquery-datatables - 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