def test_rm(self, exist, stop, osd_obj): q = OSDRemovalQueue(mock.Mock()) q.osds.add(osd_obj) q.rm(osd_obj) osd_obj.stop.assert_called_once()
def test_rm_raise(self, exist, stop, osd_obj): q = OSDRemovalQueue(mock.Mock()) with pytest.raises(KeyError): q.rm(osd_obj) osd_obj.stop.assert_called_once()