Exemplo n.º 1
0
 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()
Exemplo n.º 2
0
 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()