Beispiel #1
0
 def setUp(self):
     self.test = cattery.Cattery()
Beispiel #2
0
def cattery_client():
    return cattery.Cattery()
Beispiel #3
0
def test__add_cats__succeeds():
    c = cattery.Cattery()
    c.add_cats(["Fluffy", "Snookums"])
    assert c.cats == ["Fluffy", "Snookums"]
    assert c.num_cats == 2
Beispiel #4
0
    def test__remove_cat__no_cats__fails(self):
        c = cattery.Cattery()

        with self.assertRaises(cattery.CatNotFound):
            c.remove_cat("Fluffles")
Beispiel #5
0
def test__remove_cat__cat_not_in_cattery__fails():
    c = cattery.Cattery()
    c.add_cats(["Fluffy"])
    with pytest.raises(cattery.CatNotFound):
        c.remove_cat("Snookums")
Beispiel #6
0
def test__remove_cat__no_cats__fails():
    c = cattery.Cattery()
    with pytest.raises(cattery.CatNotFound):
        c.remove_cat("Fluffles")
Beispiel #7
0
def test__remove_cat__succeeds():
    c = cattery.Cattery()
    c.add_cats(["Fluffy", "Junior"])
    c.remove_cat("Fluffy")
    assert c.cats == ["Junior"]
    assert c.num_cats == 1
Beispiel #8
0
def a_cattery():
    return cattery.Cattery()
Beispiel #9
0
def c():
    return cattery.Cattery()