Exemplo n.º 1
0
    def test_dynalog(self):
        # test making an anonymized copy
        dlog_file = osp.join(ANONYMOUS_DEST_FOLDER, 'A1234_patientid.dlg')
        dlog = Dynalog(dlog_file)
        dlog.anonymize()

        # test doing inplace anonymization
        files = dlog.anonymize(inplace=True, suffix='inplace')
        for file in files:
            self.assertTrue('inplace' in file)
Exemplo n.º 2
0
 def test_bad_name(self):
     """Test that a log with a bad name (no underscore) fails gracefully."""
     dlog_file = osp.join(ANONYMOUS_DEST_FOLDER, 'A1234patientid.dlg')
     dlog = Dynalog(dlog_file)
     with self.assertRaises(NameError):
         dlog.anonymize()