def test_can_unbond_from_atom(self): atom = Atom("C") atom2 = Mock(_bonded_atoms={atom}) atom._bonded_atoms = {atom2} atom.unbond_from(atom2) self.assertEqual(atom._bonded_atoms, set()) self.assertEqual(atom2._bonded_atoms, set())
def test_can_handle_unbonding_from_unconnected_atom(self): atom = Atom("C") atom2 = Mock(_bonded_atoms=set()) atom.unbond_from(atom2) self.assertEqual(atom._bonded_atoms, set()) self.assertEqual(atom2._bonded_atoms, set())