diff --git a/openfe/tests/setup/atom_mapping/test_atommapper.py b/openfe/tests/setup/atom_mapping/test_atommapper.py index 3f70d0d63..99729ce7c 100644 --- a/openfe/tests/setup/atom_mapping/test_atommapper.py +++ b/openfe/tests/setup/atom_mapping/test_atommapper.py @@ -23,6 +23,17 @@ class ConcreteLigandAtomMapper(LigandAtomMapper): def __init__(self, mappings): self.mappings = mappings + @classmethod + def _defaults(cls): + return {} + + def _to_dict(self): + return {'mappings': self.mappings} + + @classmethod + def _from_dict(cls, dct): + return cls(**dct) + def _mappings_generator(self, componentA, componentB): for mapping in self.mappings: yield mapping.componentA_to_componentB diff --git a/openfe/tests/setup/test_network_planning.py b/openfe/tests/setup/test_network_planning.py index 30dc78c01..5d194282a 100644 --- a/openfe/tests/setup/test_network_planning.py +++ b/openfe/tests/setup/test_network_planning.py @@ -10,6 +10,17 @@ class BadMapper(openfe.setup.atom_mapping.LigandAtomMapper): + @classmethod + def _defaults(cls): + return {} + + def _to_dict(self): + return {} + + @classmethod + def _from_dict(cls, d): + return cls() + def _mappings_generator(self, molA, molB): yield {0: 0}