示例#1
0
def test_AnimalShelter_dequeue_pref_dog():
    shelter = AnimalShelter()
    cheeto = Cat('Cheeto')
    oliver = Dog('Oliver')
    shelter.enqueue(cheeto)
    shelter.enqueue(oliver)
    actual = shelter.dequeue('dog')
    expected = 'cat'
    assert actual == expected
示例#2
0
def test_AnimalShelter_dequeue_pref_not_catOrDog():
    shelter = AnimalShelter()
    cheeto = Cat('Cheeto')
    oliver = Dog('Oliver')
    shelter.enqueue(cheeto)
    shelter.enqueue(oliver)
    actual = shelter.dequeue('bird')
    expected = None
    assert actual == expected