コード例 #1
0
def test_should_buy_10_more_maxibons_if_there_are_less_than_2_in_the_fridge_when_grabbing_maxibons_in_group(
        developers):
    office = KarumiHQs()
    initial_maxibons = office.maxibonsLeft()
    office.openFridge(developers)
    expected_maxibons = calculate_maxibons_left(initial_maxibons, developers)
    assert office.maxibonsLeft() == expected_maxibons
コード例 #2
0
def test_should_request_10_more_maxibons_using_the_chat_if_there_are_less_than_3_in_the_fridge_when_grabbing_maxibons_in_group(
        developers):
    chat = Chat()
    office = KarumiHQs(chat)
    office.openFridge(developers)
    assert office.chat.messageSent == f"Hi guys, I'm {developers[-1].name}. We need more maxibons!"
コード例 #3
0
def test_should_always_has_more_than_two_maxibons_in_the_fridge_even_if_some_karumies_grab_maxibons_in_group(
        developers):
    office = KarumiHQs()
    office.openFridge(developers)
    assert office.maxibonsLeft() > 2
コード例 #4
0
def test_should_never_request_more_maxibons_to_the_team_using_the_chat_if_there_are_more_than_2_in_the_fridge(
        developer):
    chat = Chat()
    office = KarumiHQs(chat)
    office.openFridge(developer)
    assert office.chat.messageSent is None
コード例 #5
0
def test_should_always_has_more_than_two_maxibons_in_the_fridge(developer):
    office = KarumiHQs()
    office.openFridge(developer)
    assert office.maxibonsLeft() >= 2
コード例 #6
0
def never_request_more_maxibons_to_the_team_using_the_chat_if_there_are_more_than_2_in_the_fridge_when_grabbing_maxibons_in_group(
        developers):
    chat = Chat()
    office = KarumiHQs(chat)
    office.openFridge(developers)
    assert office.chat.messageSent == None