def test_weShouldKnowWhoIsAtTheParty(): party = Party() lisa = Guest("Lisa", 'female') rob = Guest("Rob", 'male') susan = Guest("susan", 'female') party.attendedBy(lisa) party.attendedBy(rob) party.attendedBy(susan) assert ["Lisa", "Rob", "susan"] == party.getAttendees()
def test_aPartywithThreeGuestsShouldHaveThreeGuests(): party = Party() lisa = Guest("Lisa", 'female') rob = Guest("Rob", 'male') susan = Guest("susan", 'female') party.attendedBy(lisa) party.attendedBy(rob) party.attendedBy(susan) assert 3 == party.numberOfGuests()
def test_createShoppingListBasedOnParty(): shoppingList = ShoppingList() party = Party() lisa = Guest("Lisa", 'female') rob = Guest("Rob", 'male') susan = Guest("susan", 'female') party.attendedBy(lisa) party.attendedBy(rob) party.attendedBy(susan) shoppingList.baseOn(party) assert shoppingList.getItems() == ["wine for 4", "food for 4"]
def test_aPartywithNoGuestsShouldHaveNoPartyGuests(): party = Party() assert 0 == party.numberOfGuests()
def test_aPartyShouldHaveALocation(): party = Party() party.setLocation("my House") assert "my House" == party.getLocation()
def test_aGuestShouldBeAbleToLeaveAParty(): party = Party() lisa = Guest("Lisa", 'female') rob = Guest("Rob", 'male') susan = Guest("susan", 'female') party.attendedBy(lisa) party.attendedBy(rob) party.attendedBy(susan) party.leftBy(rob) assert 2 == party.numberOfGuests()
def test_aPartywithOneGuestShouldHaveOnePartyGuest(): party = Party() lisa = Guest("Lisa", 'female') party.attendedBy(lisa) assert 1 == party.numberOfGuests()