コード例 #1
0
ファイル: test__init__.py プロジェクト: gholamiayub/betty
 def test_with_private_source_should_anonymize(self,
                                               m_anonymize_source) -> None:
     source = Source('S0', 'The Source')
     source.private = True
     ancestry = Ancestry()
     ancestry.sources[source.id] = source
     anonymize(ancestry)
     m_anonymize_source.assert_called_once_with(source)
コード例 #2
0
ファイル: test__init__.py プロジェクト: gholamiayub/betty
 def test_with_public_source_should_not_anonymize(
         self, m_anonymize_source) -> None:
     source = Source('S0', 'The Source')
     source.private = False
     ancestry = Ancestry()
     ancestry.sources[source.id] = source
     anonymize(ancestry)
     m_anonymize_source.assert_not_called()
コード例 #3
0
ファイル: test_ancestry.py プロジェクト: ricardokirkner/betty
 def test_private(self) -> None:
     sut = Source()
     self.assertIsNone(sut.private)
     private = True
     sut.private = private
     self.assertEquals(private, sut.private)