def queue_cat_test(): cat1 = Cat('kitty') cat2 = Cat('lucy') cat3 = Cat('sabi') cat4 = Cat('radi') cats = AnimalShelter() cats.enqueue(cat1) cats.enqueue(cat2) cats.enqueue(cat3) cats.enqueue(cat4) return cats.cat
def test_cat_enqueue(): expected = "kitty" cat1 = Cat('kitty') animal_sh = AnimalShelter() animal_sh.enqueue(cat1) actual = f"{animal_sh.cat}" assert actual == expected
def test_single_animal(): shelter = AnimalShelter() cat = Cat() shelter.enqueue(cat) actual = shelter.dequeue("cat") expected = cat assert actual == expected
def test_enqueue_cat(): a = AnimalShelter() c = Cat() a.enqueue(c) actual = a.dequeue("cat") excepted = c assert actual == excepted
def test_animal_dequeue(): shelter = AnimalShelter() cat = Cat() dog = Dog() shelter.enqueue(cat) shelter.enqueue(dog) shelter.enqueue(dog) actual = shelter.dequeue('dog') expected = dog assert actual == expected
def instances(): animal_shelter = AnimalShelter() ketty = Cat('ketty', 1) rex = Dog('rex', 2) jack = Dog('jack', 3) return [animal_shelter, ketty, rex, jack]