Exemplo n.º 1
0
def test_it_can_detect_if_current_without_ends_date(yesterday):
    address = Address(countries.get('gb'), 'City')
    affiliation = Affiliation('1',
                              address=address,
                              organisation='Org',
                              starts=yesterday)

    assert affiliation.is_current() is True
Exemplo n.º 2
0
def test_it_can_detect_if_not_current_with_no_starts_date_and_past_ends_date(
        yesterday):
    address = Address(countries.get('gb'), 'City')
    affiliation = Affiliation('1',
                              address=address,
                              organisation='Org',
                              ends=yesterday)

    assert affiliation.is_current() is False
Exemplo n.º 3
0
def test_it_can_detect_if_not_current_with_future_starts_date_and_no_ends_date(
        tomorrow):
    address = Address(countries.get('gb'), 'City')
    affiliation = Affiliation('1',
                              address=address,
                              organisation='Org',
                              starts=tomorrow)

    assert affiliation.is_current() is False