def test_dequeue_dog(): tacoma = Animal_shelter() tacoma.enqueue('dog', 'spike') tacoma.enqueue('dog', 'Ruff') tacoma.enqueue('cat', 'BLAH') assert tacoma.dequeue('dog').name == 'spike'
def test_dequeue_cat(): auburn = Animal_shelter() auburn.enqueue('dog', 'spike') auburn.enqueue('dog', 'Ruff') auburn.enqueue('cat', 'BLAH') assert auburn.dequeue('cat').name == 'blah'
def test_dequeue_nonexistent_dog(): tukwila = Animal_shelter() tukwila.enqueue('cat', 'Petunia') tukwila.enqueue('cat', 'Polly') assert tukwila.dequeue('dog') is None
def test_dequeue_nonexistent_cat(): convington = Animal_shelter() convington.enqueue('dog', 'spike') convington.enqueue('dog', 'Ruff') assert convington.dequeue('cat') is None
def test_dequeue_bunny(): sumner = Animal_shelter() sumner.enqueue('cat', 'Petunia') sumner.enqueue('cat', 'Polly') assert sumner.dequeue('bunny') is None