def one_band(): some_band = Band( "Nirvana", [ Guitarist("Kurt Cobain"), Bassist("Krist Novoselic"), Drummer("Dave Grohl"), ], ) return some_band
def test_bassist(): flea = Bassist("Flea") assert flea.name == "Flea" assert flea.get_instrument() == "bass"
def test_bassist_repr(): meshell = Bassist("Meshell Ndegeocello") actual = repr(meshell) expected = "Bassist instance. Name = Meshell Ndegeocello" assert actual == expected
def test_bassist_str(): meshell = Bassist("Meshell Ndegeocello") actual = str(meshell) expected = "My name is Meshell Ndegeocello and I play bass" assert actual == expected