def test_search_not_found(self, build_mock_domain): dom = build_mock_domain backup_group = BackupGroup() with pytest.raises(StopIteration): next(backup_group.search(dom))
def test_search(self, build_mock_domain): dom = build_mock_domain backup_group = BackupGroup(domlst=(dom, )) dombak = next(backup_group.search(dom)) assert dombak == backup_group.backups[0]